Fixing kNeighbor benchmark to use broadcast instead of iterating over array elements...
authorHarshitha <gplkrsh2@illinois.edu>
Thu, 3 May 2012 22:02:00 +0000 (17:02 -0500)
committerHarshitha <gplkrsh2@illinois.edu>
Thu, 3 May 2012 22:02:00 +0000 (17:02 -0500)
examples/charm++/load_balancing/kNeighbor/kNeighbor.C

index ac416d9f084e46bbb817e9257a7e8a9974a44b68..35c462cb24ebebf0a04dcdc16bcda583622a315c 100644 (file)
@@ -122,8 +122,7 @@ class Main: public CBase_Main {
       }
 
       gStarttime = CmiWallTimer();
-      for (int i=0; i<num_chares; i++)
-       array[i].commWithNeighbors();
+       array.commWithNeighbors();
     }
 
     void resumeIter() {
@@ -131,8 +130,7 @@ class Main: public CBase_Main {
       CkPrintf("Resume iteration at step %d\n", currentStep);
 #endif
       gStarttime = CmiWallTimer();
-      for (int i=0; i<num_chares; i++)
-       array[i].commWithNeighbors();
+       array.commWithNeighbors();
     }
 
     void terminate(CkReductionMsg *msg) {