HPCxx_Group

Recall that an HPC++ computation consists of a set of nodes, each of which contains one or more contexts. Each context runs one or more threads.

At the startup time of a computation the HPC++Lib initialization creates an object called a group. Groups are used to identify sets of threads and sets of contexts that participate in collective operations like barriers. The HPCxx_Group class has the following public interface.


Class Definition

class HPCxx_Group{
  public:
  // Create a new group for the current context.
  HPCxx_Group(hpcxx_id_t &groupID = HPCXX_GEN_LOCAL_GROUPID,
                          const char *name = NULL);

  // Create a group whose membership is this context 
  //and those in the list
  HPCxx_Group(const HPCxx_ContextID *&id, 
              int count,
              hpcxx_id_t &groupID = HPCXX_GEN_LOCAL_GROUPID,
              const char *name = NULL);

  ~HPCxx_Group();
  hpcxx_id_t &getGroupID();
  static HPCxx_Group *getGroup(hpcxx_id_t groupID);
  // Get the number of contexts that are participating
  // in this group
  int getNumContexts();
  // Return an ordered array of context IDs in
  // this group.  This array is identical for every member
  // of the group.
  HPCxx_ContextID *getContextIDs();
  // Return the context id for zero-based context <n> where
  // <n> is less than the current number of contexts
  HPCxx_ContextID getContextID(int context);
  // Set the number of threads for this group in *this*
  // context.
  void setNumThreads(int count);
  int getNumThreads();
  void setName(const char *name);
  const char *getName();
};
    

Examples
hpc++@extreme.indiana.edu

Last modified: Thu Apr 22 00:19:57 EST 1999