Added CkReductionTarget for reductiontarget callbacks
authorAaron Becker <akbecker@gmail.com>
Fri, 28 Jan 2011 22:38:35 +0000 (16:38 -0600)
committerAaron Becker <akbecker@gmail.com>
Fri, 28 Jan 2011 22:38:35 +0000 (16:38 -0600)
examples/charm++/typed_reduction/TypedReduction.cc
src/ck-core/ckreduction.h

index 15b34345f6b7a44b8f695c4ba0fb876c891135dd..a5cd1721c8398b40ead58d2de847420f0f56ea3d 100644 (file)
@@ -16,7 +16,7 @@ void Driver::untyped_done(CkReductionMsg* m) {
     delete m;
 
     CkCallback *cb = new CkCallback(
-            CkIndex_Driver::typed_done_redn_wrapper(NULL), thisProxy);
+            CkReductionTarget(Driver, typed_done), thisProxy);
     w.ckSetReductionClient(cb);
     w.reduce();
 }
index 8ca0a7d4265db623a911ad1a7d218a504f1da81a..75df2911d524e68a22eaaeeff2957d52e856430f 100644 (file)
@@ -347,6 +347,9 @@ private:
        const CkCallback &cb,int userFlag=-1); \
   void contribute(CkReductionMsg *msg);\*/
 
+#define CkReductionTarget(me, method) \
+    CkIndex_##me::method##_redn_wrapper(NULL)
+
 #define CK_REDUCTION_CONTRIBUTE_METHODS_DEF(me,myRednMgr,myRednInfo,migratable) \
 void me::contribute(int dataSize,const void *data,CkReduction::reducerType type,\
        int userFlag)\