Merge branch 'charm' of charmgit:charm into charm
[charm.git] / src / ck-com / RectMulticastStrategy.C
index 5c7142b87b4da76775cef85f112edfc5d140c88b..33656ef6c70da69607ccd4fab1aecf96119a2bc2 100644 (file)
@@ -111,15 +111,11 @@ void * rectRequest (int comm) {
   return CkpvAccess(com_rect_ptr)->get(comm);
 }
 
-RectMulticastStrategy::RectMulticastStrategy(CkArrayID aid, 
-                                                int isPersistent)
+RectMulticastStrategy::RectMulticastStrategy(CkArrayID aid)
     : Strategy(), CharmStrategy() {
 
     ainfo.setDestinationArray(aid);
     setType(ARRAY_STRATEGY);
-
-    //    this->isPersistent = isPersistent;
-    this->isPersistent = 0;  //force off for now
 }
 
 //Destroy all old built routes
@@ -275,7 +271,7 @@ void RectMulticastStrategy::insertSectionID(CkSectionID *sid) {
 
 
 ComlibRectSectionHashObject *
-RectMulticastStrategy::createObjectOnSrcPe(int nindices, CkArrayIndexMax *idxlist, unsigned int thisSectionID) {
+RectMulticastStrategy::createObjectOnSrcPe(int nindices, CkArrayIndex *idxlist, unsigned int thisSectionID) {
 
     ComlibPrintf("[%d] createObjectOnSrcPe \n", CkMyPe());   
     ComlibPrintf("[%d] Rect createObjectOnSrcPe \n", CkMyPe());   
@@ -492,7 +488,7 @@ BGTsRC_Geometry_t *RectMulticastStrategy::getRectGeometry(ComlibRectSectionHashO
 
 ComlibRectSectionHashObject *
 RectMulticastStrategy::createObjectOnIntermediatePe(int nindices,
-                                                     CkArrayIndexMax *idxlist,
+                                                     CkArrayIndex *idxlist,
                                                      int npes,
                                                      ComlibMulticastIndexCount *counts,
                                                      int srcpe, int thisSectionID) {
@@ -578,11 +574,6 @@ void RectMulticastStrategy::localMulticast(envelope *env,
                                           ComlibRectSectionHashObject *obj) {
     int nIndices = obj->indices.size();
     
-    //If the library is set to persistent. 
-    //The message is stored in the library. The applications should 
-    //use the message as a readonly and it exists till the next one 
-    //comes along
-    
     if(obj->msg != NULL) {
         CmiFree(obj->msg);
        obj->msg = NULL;
@@ -594,12 +585,6 @@ void RectMulticastStrategy::localMulticast(envelope *env,
         
         msg1 = CkCopyMsg(&msg);
        
-       if(isPersistent) {
-         CkAbort("persistent not supported in Rectangle yet");
-           CmiReference(UsrToEnv(msg1));
-           obj->msg = (void *)UsrToEnv(msg1);
-       }
-       
         ComlibArrayInfo::localMulticast(&(obj->indices), UsrToEnv(msg1));
     }    
 }
@@ -683,7 +668,6 @@ void RectMulticastStrategy::forwardMulticast(envelope *env,
 void RectMulticastStrategy::pup(PUP::er &p){
 
     CharmStrategy::pup(p);
-    p | isPersistent; 
 }
 
 void RectMulticastStrategy::beginProcessing(int numElements){
@@ -693,7 +677,7 @@ void RectMulticastStrategy::beginProcessing(int numElements){
     bgl_machine_RectBcastConfigure (rectRequest);
     CkArrayID dest;
     int nidx;
-    CkArrayIndexMax *idx_list;
+    CkArrayIndex *idx_list;
 
     ainfo.getDestinationArray(dest, idx_list, nidx);
     sinfo = ComlibSectionInfo(dest, myInstanceID);
@@ -772,7 +756,7 @@ void RectMulticastStrategy::handleNewMulticastMessage(envelope *env) {
     int sender=env->getSrcPe();
     int localElems;
     envelope *newenv;
-    CkArrayIndexMax *local_idx_list;    
+    CkArrayIndex *local_idx_list;    
     
     sinfo.unpack(env, localElems, local_idx_list, newenv);
 
@@ -789,7 +773,7 @@ void RectMulticastStrategy::handleNewMulticastMessage(envelope *env) {
     }
 
     /*
-    CkArrayIndexMax *idx_list_array = new CkArrayIndexMax[idx_list.size()];
+    CkArrayIndex *idx_list_array = new CkArrayIndex[idx_list.size()];
     for(int count = 0; count < idx_list.size(); count++)
         idx_list_array[count] = idx_list[count];
     */