Merge branch 'charm' of charmgit:charm into charm
[charm.git] / src / ck-com / RectMulticastStrategy.h
index 8d9fbfe93d8653628b816f21977f05c377ea02a7..dbf62ff75fa5a98cfc61214b0595e12e3c235d69 100644 (file)
@@ -1,6 +1,15 @@
 #ifndef RECT_MULTICAST_STRATEGY
 #define RECT_MULTICAST_STRATEGY
 
+
+/**
+   @addtogroup ComlibCharmStrategy
+   @{
+   @file
+   @brief RectMulticastStrategy for BG/L native layer
+*/
+
+
 // only works on BG/L Native Layer
 
 #include "ComlibManager.h"
@@ -32,13 +41,11 @@ void *DMHandler(void *msg);
  */
 #ifdef CMK_RECT_API
 #include "bgml.h"
-class RectMulticastStrategy: public CharmStrategy {
+class RectMulticastStrategy: public Strategy, public CharmStrategy {
  protected:
     int handlerId;    
     ComlibSectionInfo sinfo;
 
-    int isPersistent; 
-    
     ///Array section support.
     CkHashtableT<ComlibSectionHashKey, ComlibRectSectionHashObject *> sec_ht; 
 
@@ -57,7 +64,7 @@ class RectMulticastStrategy: public CharmStrategy {
     ///Called when a new section multicast is called by the user locally.
     ///The strategy should then create a topology for it and return a hash
     ///object to store that topology.
-    virtual ComlibRectSectionHashObject *createObjectOnSrcPe(int nindices, CkArrayIndexMax *idx_list, unsigned int sectionid);
+    virtual ComlibRectSectionHashObject *createObjectOnSrcPe(int nindices, CkArrayIndex *idx_list, unsigned int sectionid);
 
     /**   
      * Similar to createHashObjectOnSrcPe, but that this call is made on the
@@ -72,7 +79,7 @@ class RectMulticastStrategy: public CharmStrategy {
      * @param srcpe processor which started the multicast
      * @return a hash object describing the section
      */
-    virtual ComlibRectSectionHashObject *createObjectOnIntermediatePe(int nindices, CkArrayIndexMax *idxlist, int npes, ComlibMulticastIndexCount *counts, int srcpe, int sectionID);
+    virtual ComlibRectSectionHashObject *createObjectOnIntermediatePe(int nindices, CkArrayIndex *idxlist, int npes, ComlibMulticastIndexCount *counts, int srcpe, int sectionID);
         
     ///Needed for getNewMulticastMessage, to specify if the list of processors need to be ordered
     virtual int needSorting() { return 0; }
@@ -100,10 +107,10 @@ class RectMulticastStrategy: public CharmStrategy {
 
 
 
-    RectMulticastStrategy(CkMigrateMessage *m): CharmStrategy(m){}
+    RectMulticastStrategy(CkMigrateMessage *m): Strategy(m), CharmStrategy(m){}
                 
     ///Array constructor
-    RectMulticastStrategy(CkArrayID aid, int isPersistent = 0);
+    RectMulticastStrategy(CkArrayID aid);
         
         
     //Destuctor
@@ -122,12 +129,18 @@ class RectMulticastStrategy: public CharmStrategy {
     PUPable_decl(RectMulticastStrategy);
 };
 #else
-class RectMulticastStrategy : public CharmStrategy {   
-  RectMulticastStrategy(CkMigrateMessage *m): CharmStrategy(m){}
-  //    RectMulticastStrategy(CkArrayID aid, int isPersistent = 0){}
+class RectMulticastStrategy : public Strategy, public CharmStrategy {   
+  RectMulticastStrategy(CkMigrateMessage *m): Strategy(m), CharmStrategy(m){}
+  //    RectMulticastStrategy(CkArrayID aid){}
   ~RectMulticastStrategy(){}
+  void insertMessage(MessageHolder*) {}
+  void handleMessage(void*) {}
+  void pup(PUP::er &p) {}
   PUPable_decl(RectMulticastStrategy);   
 };
 #endif
-#endif
 
+
+/*@}*/
+
+#endif