Checking in a new broadcast strategy which broadcasts to arrays along a load-balanced...
[charm.git] / src / ck-com / BroadcastStrategy.h
index eeda41b1f0e92c9367fd6221c0f121f27f49fb5b..adb54b689604b909b59b94353a009c9e3f5e58d9 100644 (file)
 
 class BroadcastStrategy : public CharmStrategy {
 
-    int handlerId;
-    int spanning_factor;
-    int _topology;
+    int _topology;         //Topology to use Tree or Hypercube
+
+    int handlerId;          //broadcast handler id
+    int spanning_factor;    //the spanning factor of the tree
+
+    double logp;       //ceil of log of number of processors
+
+    void initHypercube();      
 
     void handleTree(char *msg);
-    void handleHypercube(char *msg);
+    void handleHypercube(char *msg);    
 
  public:
     BroadcastStrategy(int topology = USE_HYPERCUBE);
+    BroadcastStrategy(CkArrayID aid, int topology = USE_HYPERCUBE);
     BroadcastStrategy(CkMigrateMessage *){}
     void insertMessage(CharmMessageHolder *msg);
     void doneInserting();