Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/c-target/fragments/par-kdtree.in
ViewVC logotype

Diff of /branches/lamont/src/compiler/c-target/fragments/par-kdtree.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2582, Thu Apr 10 19:28:22 2014 UTC revision 2583, Thu Apr 10 19:50:28 2014 UTC
# Line 395  Line 395 
395      axis = (axis + 1) % wrld->spatialTree->dim;      axis = (axis + 1) % wrld->spatialTree->dim;
396      int mid = start + ((start + len)-start)/2;      int mid = start + ((start + len)-start)/2;
397    
398        if(len < sched->seqThreshold){
399            preSort(wrld,sched,start,mid - start, axis);
400            preSort(wrld,sched,mid + 1,start + len - (mid+ 1), axis);
401        }else {
402    
403      SpatialWorkerArgs_t * worker = Diderot_Grab_SpatailWorkerSort(sched,SORT_WORKER,mid + 1,start + len - (mid+ 1), axis);      SpatialWorkerArgs_t * worker = Diderot_Grab_SpatailWorkerSort(sched,SORT_WORKER,mid + 1,start + len - (mid+ 1), axis);
404    
405      if(!worker){      if(!worker){
# Line 405  Line 410 
410          preSort(wrld,sched,start,mid - start, axis);          preSort(wrld,sched,start,mid - start, axis);
411      }      }
412  }  }
413    }
414  @STRANDTY@ * find_median(@PREFIX@World_t *wrld,int start, int end, int dim){  @STRANDTY@ * find_median(@PREFIX@World_t *wrld,int start, int end, int dim){
415    
416      if(end <= start) return NULL;      if(end <= start) return NULL;

Legend:
Removed from v.2582  
changed lines
  Added in v.2583

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0