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 2852, Mon Dec 15 13:15:11 2014 UTC revision 2853, Mon Dec 15 16:31:25 2014 UTC
# Line 427  Line 427 
427      if(sched->leaderId != id) {      if(sched->leaderId != id) {
428          spatialWorker(&sched->workers[id]);          spatialWorker(&sched->workers[id]);
429       }else {       }else {
430         // sched->startTime = airTime();          sched->startTime = airTime();
431          KDTree_t * tree  = wrld->spatialTree;          KDTree_t * tree  = wrld->spatialTree;
432          //int numStrands = *(tree->numOfStrands);          //int numStrands = *(tree->numOfStrands);
433        //  memcpy(wrld->spatialTmpIndices,wrld->spatialIndices, sizeof(uint32_t)*@SPATIAL_DIMENSION@ * wrld->numStrands);        //  memcpy(wrld->spatialTmpIndices,wrld->spatialIndices, sizeof(uint32_t)*@SPATIAL_DIMENSION@ * wrld->numStrands);
# Line 455  Line 455 
455          //treeWorker(&sched->workerData[id]);          //treeWorker(&sched->workerData[id]);
456    
457          tree->root = Diderot_KDTree_BuildHelper(wrld, wrld->spatialSched,&sched->workers[id], 0,*(tree->numOfStrands),0);          tree->root = Diderot_KDTree_BuildHelper(wrld, wrld->spatialSched,&sched->workers[id], 0,*(tree->numOfStrands),0);
458            sched->endTime = airTime();
459          pthread_mutex_lock (&sched->barrier);          pthread_mutex_lock (&sched->barrier);
460          sched->isTreeBuilt = true;          sched->isTreeBuilt = true;
461          pthread_cond_broadcast(&sched->runWait);          pthread_cond_broadcast(&sched->runWait);
# Line 473  Line 473 
473            //  sched->numWorkers +=1;            //  sched->numWorkers +=1;
474          //pthread_mutex_unlock(&sched->lock);          //pthread_mutex_unlock(&sched->lock);
475         // treeWorker(&sched->workerData[id]);         // treeWorker(&sched->workerData[id]);
476        //*(spatialTotalTime) = *(spatialTotalTime) + sched->stopTime;          *(spatialTotalTime) = *(spatialTotalTime) + (sched->endTime - sched->startTime);
477        //printf("Build Done\n");        //printf("Build Done\n");
478        }        }
479        //Reset spatial in for the next iteration        //Reset spatial in for the next iteration

Legend:
Removed from v.2852  
changed lines
  Added in v.2853

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