MSA: Accumulate in a 3D array should take 3 indices
authorPhil Miller <mille121@illinois.edu>
Tue, 14 Jul 2009 19:03:07 +0000 (14:03 -0500)
committerPhil Miller <mille121@illinois.edu>
Thu, 10 Dec 2009 22:22:57 +0000 (16:22 -0600)
src/libs/ck-libs/multiphaseSharedArrays/msa-distArray.h

index 1a238921ed90b4aea9954155d89c0df322e813cf..7a48b9bd551f4a95ab7b40979ea1d79a22d736ce 100644 (file)
@@ -822,15 +822,15 @@ public:
             : Handle(msa_) { }
         using Handle::checkInvalidate;
     public:
-        inline Accumulable<ENTRY, ENTRY_OPS_CLASS> accumulate(unsigned int idx)
-        { 
+        inline Accumulable<ENTRY, ENTRY_OPS_CLASS> accumulate(unsigned int x, unsigned int y, unsigned int z)
+        {
             Handle::checkValid();
-            return Accumulable<ENTRY, ENTRY_OPS_CLASS>(Handle::msa.accumulate(idx));
+            return Accumulable<ENTRY, ENTRY_OPS_CLASS>(Handle::msa.accumulate(x,y,z));
         }
-        inline void accumulate(unsigned int idx, const ENTRY& ent)
+        inline void accumulate(unsigned int x, unsigned int y, unsigned int z, const ENTRY& ent)
         {
             Handle::checkValid();
-            Handle::msa.accumulate(idx, ent);
+            Handle::msa.accumulate(x,y,z, ent);
         }
 
         void accumulate(unsigned x1, unsigned y1, unsigned z1, unsigned x2, unsigned y2, unsigned z2, const ENTRY *buf)
@@ -848,8 +848,8 @@ public:
                         Handle::msa.accumulate(ix, iy, iz, buf[i++]);
         }
 
-        inline Accumulable<ENTRY, ENTRY_OPS_CLASS> operator() (unsigned int idx)
-            { return accumulate(idx); }
+        inline Accumulable<ENTRY, ENTRY_OPS_CLASS> operator() (unsigned int x, unsigned int y, unsigned int z)
+            { return accumulate(x,y,z); }
     };
 
 protected: