ArrayMaps: efforts to make procNum a leaf function
authorAbhinav S Bhatele <bhatele@illinois.edu>
Wed, 22 Dec 2010 18:57:29 +0000 (12:57 -0600)
committerAbhinav S Bhatele <bhatele@illinois.edu>
Wed, 22 Dec 2010 18:57:29 +0000 (12:57 -0600)
src/ck-core/cklocation.C

index 39ef036d6427ea3749c08b70c41b36a04d6f42b2..c9ddc097a425ec6b7582c57a3e32dda9e0028d2c 100644 (file)
@@ -331,9 +331,12 @@ public:
       flati = i.data()[0] * amaps[arrayHdl]->_nelems.data()[1] + i.data()[1];
     } else if (i.nInts == 3) {
       flati = (i.data()[0] * amaps[arrayHdl]->_nelems.data()[1] + i.data()[1]) * amaps[arrayHdl]->_nelems.data()[2] + i.data()[2];
-    } else {
+    }
+#if CMK_ERROR_CHECKING
+    else {
       CkAbort("CkArrayIndex has more than 3 integers!");
     }
+#endif
 
     if(flati < amaps[arrayHdl]->_numFirstSet)
       return (flati / (amaps[arrayHdl]->_binSize + 1));
@@ -388,9 +391,12 @@ public:
       flati = i.data()[0] * amaps[arrayHdl]->_nelems.data()[1] + i.data()[1];
     } else if (i.nInts == 3) {
       flati = (i.data()[0] * amaps[arrayHdl]->_nelems.data()[1] + i.data()[1]) * amaps[arrayHdl]->_nelems.data()[2] + i.data()[2];
-    } else {
+    }
+#if CMK_ERROR_CHECKING
+    else {
       CkAbort("CkArrayIndex has more than 3 integers!");
     }
+#endif
 
     /** binSize calculated in DefaultArrayMap is the floor of numChares/numPes
      *  but for this FastArrayMap, we need the ceiling */