updated to latest delegation API
authorGengbin Zheng <gzheng@illinois.edu>
Thu, 14 Jul 2011 14:46:59 +0000 (09:46 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Thu, 14 Jul 2011 14:46:59 +0000 (09:46 -0500)
tests/charm++/delegation/1darray/hello.C

index e78513b82a29de7ddf6215f564980543f19497a2..659c7e38bd54fdefaa9245b584407e2e5a0f07a7 100644 (file)
@@ -41,13 +41,13 @@ public:
 class DelegateMgr : public CkDelegateMgr {
 public:
        DelegateMgr(void) {}
-       virtual void ArraySend(int ep,void *m,const CkArrayIndex &idx,CkArrayID a)
+       virtual void ArraySend(CkDelegateData *pd,int ep,void *m,const CkArrayIndex &idx,CkArrayID a)
        {
                CkArray *arrMgr=CProxy_CkArray(a).ckLocalBranch();
                int onPE=arrMgr->lastKnown(idx);
                if (onPE==CkMyPe()) 
                { //Send to local element
-                       arrMgr->deliverViaQueue((CkMessage *)m);
+                       arrMgr->deliver((CkMessage *)m, CkDeliver_queue);
                } else 
                { //Forward to remote element
                        ckout<<"DelegateMgr> Sending message for "<<idx.data()[0]<<" to "<<onPE<<endl;
@@ -67,8 +67,8 @@ public:
                envelope *msg=(envelope *)CmiAlloc(nBytes);
                memcpy(msg,env,nBytes);
                CkUnpackMessage(&msg);
-               CProxy_CkArray ap(msg->array_mgr());
-               ap.ckLocalBranch()->deliver((CkMessage *)EnvToUsr(msg));
+               CProxy_CkArray ap(msg->getsetArrayMgr());
+               ap.ckLocalBranch()->deliver((CkMessage *)EnvToUsr(msg),CkDeliver_inline);
        }
 };