MPQC  3.0.0-alpha
Public Member Functions | Protected Member Functions | Protected Attributes
sc::ActiveMessageGrp Class Reference

ActiveMessageGrp provides an implemention of active messages that sends objects derived from ActiveMessage to remote processes and causes their run member to be executed there. More...

#include <util/group/actmsg.h>

Inheritance diagram for sc::ActiveMessageGrp:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ActiveMessageGrp (const Ref< MessageGrp > &msg, const Ref< ThreadGrp > &thr)
 Construct an ActiveMessageGrp using a MessageGrp and a ThreadGrp.
 ActiveMessageGrp (const Ref< KeyVal > &)
 A KeyVal CTOR for ActiveMessageGrp.
Ref< StateSendget_statesend ()
 Each thread using the ActiveMessageGrp needs its own StateSend object.
void send (int node, const Ref< StateSend > &, const Ref< ActiveMessage > &)
 Send the active message to node.
void activate ()
 Make the object ready to process messages.
void deactivate ()
 Processes all outstanding messages and disable processing of messages.
void sync ()
 Synchronize all of the processes in this group.
Ref< MessageGrpmessagegrp ()
 Return the MessageGrp used to implement the ActiveMessageGrp.
int n () const
 Return the number of processes.
int me () const
 Return my process identifier, starting at zero.

Protected Member Functions

void init (const Ref< MessageGrp > &msg, const Ref< ThreadGrp > &thr)

Protected Attributes

int active_
unsigned int * nreq_sent_
ActiveMessageThread ** thread_
int statesend_type_
Ref< MessageGrpmsg_
Ref< ThreadGrpthr_

Detailed Description

ActiveMessageGrp provides an implemention of active messages that sends objects derived from ActiveMessage to remote processes and causes their run member to be executed there.


Constructor & Destructor Documentation

sc::ActiveMessageGrp::ActiveMessageGrp ( const Ref< MessageGrp > &  msg,
const Ref< ThreadGrp > &  thr 
)

Construct an ActiveMessageGrp using a MessageGrp and a ThreadGrp.

A KeyVal CTOR for ActiveMessageGrp.


Member Function Documentation

Make the object ready to process messages.

This will also synchronizes the nodes. This must be called by only one thread.

Processes all outstanding messages and disable processing of messages.

This will also synchronize the processes. This must be called by only one thread.

Each thread using the ActiveMessageGrp needs its own StateSend object.

This cannot be called concurrently by multiple threads.

Return the MessageGrp used to implement the ActiveMessageGrp.

void sc::ActiveMessageGrp::send ( int  node,
const Ref< StateSend > &  ,
const Ref< ActiveMessage > &   
)

Send the active message to node.

The give StateOut must not be concurrently used by any other thread. This member can be called concurrently by multiple threads.

Synchronize all of the processes in this group.


The documentation for this class was generated from the following file:

Generated at Sat Jul 7 2012 11:53:00 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.0.