Convert libraries to inherit from CBase classes
authorPhil Miller <mille121@illinois.edu>
Tue, 27 Dec 2011 04:46:27 +0000 (22:46 -0600)
committerPhil Miller <mille121@illinois.edu>
Tue, 27 Dec 2011 05:03:30 +0000 (23:03 -0600)
src/libs/ck-libs/collide/collidecharm.C
src/libs/ck-libs/collide/collidecharm_impl.h
src/libs/ck-libs/fftlib/fftlib-normal.C
src/libs/ck-libs/fftlib/fftlib.h
src/libs/ck-libs/fftlib/rfftlib-normal.C
src/libs/ck-libs/irecv/receiver.C
src/libs/ck-libs/irecv/receiver.h
src/libs/ck-libs/mblock/mblock.C
src/libs/ck-libs/multiphaseSharedArrays/msa-DistPageMgr.h
src/libs/ck-libs/pose/sim.C
src/libs/ck-libs/pose/sim.h

index f91ea52e5b08ca9921550e27be52d82dd421719c..402de740d0888896300cc7030973193a6775cded 100644 (file)
@@ -526,7 +526,7 @@ collideVoxel::collideVoxel(void)
        collideVoxel_extents[1].add(low23(thisIndex.y));
        collideVoxel_extents[2].add(low23(thisIndex.z));
 }
-collideVoxel::collideVoxel(CkMigrateMessage *m) : ArrayElement3D(m) 
+collideVoxel::collideVoxel(CkMigrateMessage *m)
 {
        CC_STATUS("arrived from migration");
 }
@@ -536,7 +536,6 @@ collideVoxel::~collideVoxel()
        CC_STATUS("deleted. (migration depart)");
 }
 void collideVoxel::pup(PUP::er &p) {
-       ArrayElement3D::pup(p);
        if (msgs.length()!=0) {
                status("Error!  Cannot migrate voxels with messages in tow!\n");
                CkAbort("collideVoxel::pup cannot handle message case");
index 2e4c820a1e21c3e2934cd310cc21da8fc5166177..3e4c40bbb69f73995ead5b7d5fc1d2c3f9644009 100644 (file)
@@ -94,7 +94,7 @@ method to be called from each processor.  To handle
 non-autonomous cases, calls "pleaseAdvance" when an advance
 is first expected from that PE.
 */
-class syncReductionMgr : public Group 
+class syncReductionMgr : public CBase_syncReductionMgr
 {
        CProxy_syncReductionMgr thisproxy;
        void status(const char *msg) {
@@ -144,7 +144,7 @@ A single Collision operation consists of:
        -client group accepts the CollisionLists
 */
 
-class collideMgr : public syncReductionMgr
+class collideMgr : public CBase_collideMgr
 {
        CProxy_collideMgr thisproxy;
 private:
@@ -195,7 +195,7 @@ Collisions may occur.  Each step it accumulates triangle
 lists and then computes their intersection
 */
 
-class collideVoxel : public ArrayElement3D
+class collideVoxel : public CBase_collideVoxel
 {
        growableBufferT<objListMsg *> msgs;
        void status(const char *msg);
index 0853b16665d9bf2714e3786b7174b8e6b749fb80..eeac59b8bcdf6e937ad1f908289d5fd876636bfd 100644 (file)
@@ -326,7 +326,6 @@ NormalSlabArray::~NormalSlabArray()
 
 void NormalSlabArray::pup(PUP::er &p)
 {
-    ArrayElement1D::pup(p);
     //FIXME: PUP for info and plans
 /*
     for (i = 0; i < MAX_FFTS; i++) {
index da557cb6db125ede3ce198f380f126dfaff5e903..9d17afa8d35a5dc1edd7440c111dba7abdfc2d47 100644 (file)
@@ -214,7 +214,7 @@ class SlabArray: public CBase_SlabArray {
  * Normal, since the data is expected to be present all through the slab
  */
 
-class NormalSlabArray: public SlabArray {
+class NormalSlabArray: public CBase_NormalSlabArray {
  public:
        NormalSlabArray(CkMigrateMessage *m): SlabArray(m) {CkPrintf("migrate constructor called\n");}
        NormalSlabArray() {
@@ -252,7 +252,7 @@ protected:
        void createPlans(NormalFFTinfo &info);
 };
 
-class NormalRealSlabArray: public SlabArray {
+class NormalRealSlabArray: public CBase_NormalRealSlabArray {
  public:
        NormalRealSlabArray(CkMigrateMessage *m): SlabArray(m) {}
        NormalRealSlabArray() {
@@ -339,7 +339,7 @@ class RunDescriptor {
 /*
  * Sparse, the data is represented as ``runs''
  */
-class SparseSlabArray: public SlabArray {
+class SparseSlabArray: public CBase_SparseSlabArray {
  public:
        SparseSlabArray(CkMigrateMessage *m): SlabArray(m) {}
        SparseSlabArray(): SlabArray() {}
index 33ce83fefbab6d50147f413e8d5ae6015565e032..b9a7e1ea9ca215a389b8713da0c97d78c449d23d 100644 (file)
@@ -353,7 +353,6 @@ NormalRealSlabArray::~NormalRealSlabArray()
 void NormalRealSlabArray::pup(PUP::er &p)
 {
     int i;
-    ArrayElement1D::pup(p);
 
 /*    for (i = 0; i < MAX_FFTS; i++) {
        if (p.isUnpacking()) {
index 2accbd3680e84fcddd6630a5af28603ae986abed..6ab9689ef0ec2cc3251e82e1ef9e48d0ae04762e 100644 (file)
@@ -17,7 +17,7 @@ receiver::receiver()
   startwaiting = 0;
 }
 
-receiver::receiver(CkMigrateMessage *m) : ArrayElement1D(m)
+receiver::receiver(CkMigrateMessage *m)
 {
   msgTbl = CmmNew();
   reqTbl = CmmNew();
@@ -27,7 +27,6 @@ receiver::receiver(CkMigrateMessage *m) : ArrayElement1D(m)
 
 void receiver::pup(PUP::er &p)
 {
-  ArrayElement1D::pup(p);
   p(counter);
   p(startwaiting);
   // pack CmmTable: msgTbl, reqTbl
index 556780f29014221a727d9e863f469c709610816d..e5acb9bd8850f5ae5d519bcb9fe4fc991e0241a8 100644 (file)
@@ -53,7 +53,7 @@ public:
 };
 
 
-class receiver: public ArrayElement1D
+class receiver: public CBase_receiver
 {
 private:
   CmmTable  msgTbl;
index 9397ba002262cf34ec20500b428a35f97d6236c7..feadd9169b7a023f7b1ede89f8a5a5e9f93a5dbc 100644 (file)
@@ -819,9 +819,6 @@ static void cmm_pup_mblock_message(pup_er p,void **msg) {
 void
 MBlockChunk::pup(PUP::er &p)
 {
-//Pup superclass
-  ArrayElement1D::pup(p);
-
   threads.pup(p);
   messages=CmmPup(&p,messages,cmm_pup_mblock_message);
 
index 0e7f31483488751ed432e2d15f6feb2909d6cfb6..a3ff90b4f60208797b1e1292359deb1c9089c20a 100644 (file)
@@ -458,7 +458,7 @@ public:
 //=============================== Cache Manager =================================
 
 template <class ENTRY_TYPE, class ENTRY_OPS_CLASS,unsigned int ENTRIES_PER_PAGE>
-class MSA_CacheGroup : public Group
+class MSA_CacheGroup : public CBase_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE>
 {
     typedef MSA_PageT<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> page_t;
 
@@ -507,7 +507,6 @@ protected:
     typedef CProxy_MSA_PageArray<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> CProxy_PageArray_t;
     CProxy_PageArray_t pageArray;     // a proxy to the page array
     typedef CProxy_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> CProxy_CacheGroup_t;
-    CProxy_CacheGroup_t thisProxy; // a proxy to myself.
 
     std::map<CthThread, MSA_Thread_Listener *> threadList;
 
@@ -772,7 +771,6 @@ public:
                  pageTable(nPages, NULL),
                  pageStateStorage(nPages, NULL),
                  pageArray(pageArrayID),
-                 thisProxy(thisgroup),
                  max_resident_pages(max_bytes_/(sizeof(ENTRY_TYPE)*ENTRIES_PER_PAGE)),
                  entryOpsObject(new ENTRY_OPS_CLASS),
                  replacementPolicy(new vmPageReplacementPolicy(nPages, pageTable, pageStateStorage)),
@@ -936,7 +934,7 @@ public:
                        // @@ how to ensure that enroll is called only once?
 
                        //ckout << "[" << CkMyPe() << "] sending sync ack to PE 0" << endl;
-                       thisProxy[0].enrollAck(CkMyPe());
+                       this->thisProxy[0].enrollAck(CkMyPe());
                        //ckout << "[" << CkMyPe() << "] suspening thread in Sync() " << endl;
                        addAndSuspend(enrollWaiters);
                        //ckout << "[" << CkMyPe() << "] rsuming thread in Sync()" << endl;
@@ -968,7 +966,7 @@ public:
                                enrollDoneq = 1;
                                // What if fewer worker threads than pe's ?  Handled in
                                // enrollDone.
-                               thisProxy.enrollDone();
+                               this->thisProxy.enrollDone();
                        }
                }
 
@@ -1002,7 +1000,7 @@ public:
                                return;
                        }
 
-                       thisProxy[CkMyPe()].FinishSync();
+                       this->thisProxy[CkMyPe()].FinishSync();
                }
 
        void syncDebug()
@@ -1046,7 +1044,7 @@ public:
                        // a reduction over a group)
                        if(CkMyPe() != 0)
                        {
-                               thisProxy[0].SyncAck(clear);
+                               this->thisProxy[0].SyncAck(clear);
                        }
                        else /* I *am* PE 0 */
                        {
@@ -1260,7 +1258,7 @@ public:
 // "owner" as well as the "manager" for that page.
 //
 template<class ENTRY_TYPE, class ENTRY_OPS_CLASS,unsigned int ENTRIES_PER_PAGE> 
-class MSA_PageArray : public ArrayElement1D
+class MSA_PageArray : public CBase_MSA_PageArray<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE>
 {
     typedef CProxy_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> CProxy_CacheGroup_t;
     typedef MSA_PageT<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> page_t;
@@ -1270,7 +1268,7 @@ protected:
     ENTRY_OPS_CLASS entryOpsObject;
     CProxy_CacheGroup_t cache;
 
-    unsigned int pageNo() { return thisIndex; }
+    unsigned int pageNo() { return this->thisIndex; }
 
     inline void allocatePage(MSA_Page_Fault_t access) // @@@
                {
@@ -1315,9 +1313,8 @@ public:
                        cache=cache_;
                }
     
-    virtual void pup(PUP::er& p)
+    void pup(PUP::er& p)
                {
-                       ArrayElement1D::pup(p);
                        int epage_present=(epage!=0);
                        p|epage_present;
                        if (epage_present) {
@@ -1366,7 +1363,7 @@ public:
        
                        // send the acknowledgement to the sender that we received the page
                        //ckout << "Sending Ack to PE " << pe << endl;
-                       cache[pe].AckPage(thisIndex);
+                       cache[pe].AckPage(this->thisIndex);
                }
 
     /// Receive a runlength encoded page from the network:
@@ -1398,7 +1395,7 @@ public:
 
                        // send the acknowledgement to the sender that we received the page
                        //ckout << "Sending AckRLE to PE " << pe << endl;
-                       cache[pe].AckPage(thisIndex);
+                       cache[pe].AckPage(this->thisIndex);
                }
 
     // MSA_PageArray::
@@ -1408,7 +1405,7 @@ public:
                                writeIdentity();
                        MSADEBPRINT(printf("MSA_PageArray::Sync about to call contribute \n"););
                        CkCallback cb(CkIndex_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE>::SyncDone(NULL), cache);
-                       contribute(0, NULL, CkReduction::concat, cb);
+                       this->contribute(0, NULL, CkReduction::concat, cb);
                }
 
     inline void emit(int ID, int index)
index 4463fbdd6c083f467374595486a081aded6a72e6..f345aa8e11096cccdbe5e98687bbd160b903dfa2 100644 (file)
@@ -56,7 +56,6 @@ sim::~sim()
 
 /// Pack/unpack/sizing operator
 void sim::pup(PUP::er &p) {
-  ArrayElement1D::pup(p); // call parent class pup method
   // pup simple types
   p(active); p(myPVTidx); p(myLBidx); p(sync); p(DOs); p(UNDOs);
   // pup event queue
index 5940fbc72524a0f91da7822c2035b804b97bb840..d750597d9ae2eb79668c948f03b9841a468aff2f 100644 (file)
@@ -251,7 +251,7 @@ class sim : public CBase_sim {
   /// Destructor
   virtual ~sim();
   /// Pack/unpack/sizing operator
-  virtual void pup(PUP::er &p);
+  void pup(PUP::er &p);
   /// Start a forward execution step on myStrat
   void Step();                 
   /// Start a prioritized forward execution step on myStrat