Several new changes
[charm.git] / src / ck-com / EachToManyMulticastStrategy.h
1 #ifndef EACH_TO_MANY_MULTICAST_STRATEGY
2 #define EACH_TO_MANY_MULTICAST_STRATEGY
3
4 #include "ComlibManager.h"
5 #include "routerstrategy.h"
6
7 class EachToManyMulticastStrategy: public CharmStrategy {
8  protected:
9     int routerID;      //Which topology
10     int npes, *pelist; //Domain of the topology
11     int MyPe;          //My id in that domain
12
13     int ndestpes, *destpelist; //Destination processors
14     int handlerId;
15     
16     //Executes common code just after array and group constructors
17     virtual void commonInit();
18
19     RouterStrategy *rstrat;
20
21  public:
22     //Group constructor
23     EachToManyMulticastStrategy(int strategyId, int nsrcpes=0, 
24                                 int *srcpelist=0, 
25                                 int ndestpes =0, int *destpelist =0);
26     
27     //Array constructor
28     EachToManyMulticastStrategy(int substrategy, CkArrayID src, 
29                                 CkArrayID dest, int nsrc=0, 
30                                 CkArrayIndexMax *srcelements=0, int ndest=0, 
31                                 CkArrayIndexMax *destelements=0);
32     
33     EachToManyMulticastStrategy(CkMigrateMessage *m) : CharmStrategy(m){};
34     
35     ~EachToManyMulticastStrategy();
36
37     //Basic function, subclasses should not have to change it
38     virtual void insertMessage(CharmMessageHolder *msg);
39     //More specielized function
40     virtual void doneInserting();
41
42     virtual void pup(PUP::er &p);    
43     virtual void beginProcessing(int nelements);
44     virtual void finalizeProcessing();
45     virtual void localMulticast(void *msg);
46     
47     PUPable_decl(EachToManyMulticastStrategy);
48
49 };
50 #endif
51