Removing assert statement that caused strategies only to work with 1d chare arrays.
[charm.git] / src / ck-com / RingMulticastStrategy.h
1 /**
2    @addtogroup ComlibCharmStrategy
3    @{
4    @file 
5 */
6
7 #ifndef RING_MULTICAST_STRATEGY
8 #define RING_MULTICAST_STRATEGY
9
10 #include "MulticastStrategy.h"
11
12 /**
13  * Multicast Strategy that sends a multicast in a ring: the source processor
14  * send a message only to its following neighbour, which propagates it forward
15  * to its neighbour, and so on. Only the processors involved in the multicast
16  * are part of the ring.
17  */
18 class RingMulticastStrategy: public MulticastStrategy {
19  protected:
20     
21     int isEndOfRing(int next_pe, int src_pe);
22     
23     //Defining the two entries of the section multicast interface
24     virtual void createObjectOnSrcPe(ComlibSectionHashObject *obj, int npes, ComlibMulticastIndexCount *pelist);
25
26     virtual void createObjectOnIntermediatePe(ComlibSectionHashObject *obj,  int npes, ComlibMulticastIndexCount *counts, int src_pe);
27     
28  public:
29     //Array constructor
30     RingMulticastStrategy(): MulticastStrategy() {}
31     RingMulticastStrategy(CkMigrateMessage *m) : MulticastStrategy(m){}
32
33     PUPable_decl(RingMulticastStrategy);
34 };
35
36 #endif
37
38 /*@}*/