srcpe is used for two purpose, one for plain chare creation, another mainly by projec...
[charm.git] / src / ck-core / envelope.h
index 0135078a2e59535307f9cefb2dc5d3284f9854c9..d43652330f539a04cd66a7c55876158231769358 100644 (file)
@@ -149,6 +149,7 @@ public:
       struct s_chare {  // NewChareMsg, NewVChareMsg, ForChareMsg, ForVidMsg, FillVidMsg
         void *ptr;      ///< object pointer
         UInt forAnyPe;  ///< Used only by newChare
+        int  bype;      ///< created by this pe
       } chare;
       struct s_group {         // NodeBocInitMsg, BocInitMsg, ForNodeBocMsg, ForBocMsg
         CkGroupID g;           ///< GroupID
@@ -318,6 +319,14 @@ private:
     void   setObjPtr(void *p) { 
       CkAssert(getMsgtype()==ForChareMsg); type.chare.ptr = p; 
     }
+    UInt getByPe(void) { 
+      CkAssert(getMsgtype()==NewChareMsg || getMsgtype()==NewVChareMsg); 
+      return type.chare.bype; 
+    }
+    void setByPe(UInt pe) { 
+      CkAssert(getMsgtype()==NewChareMsg || getMsgtype()==NewVChareMsg); 
+      type.chare.bype = pe; 
+    }
 
 // Group-specific fields
     CkGroupID   getGroupNum(void) const {