#include <util/group/actmsg.h>

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< StateSend > | get_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< MessageGrp > | messagegrp () |
| 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< MessageGrp > | msg_ |
| Ref< ThreadGrp > | thr_ |
| 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.
Each thread using the ActiveMessageGrp needs its own StateSend object.
This cannot be called concurrently by multiple threads.
| 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.
| void sc::ActiveMessageGrp::activate | ( | ) |
Make the object ready to process messages.
This will also synchronizes the nodes. This must be called by only one thread.
| void sc::ActiveMessageGrp::deactivate | ( | ) |
Processes all outstanding messages and disable processing of messages.
This will also synchronize the processes. This must be called by only one thread.
| void sc::ActiveMessageGrp::sync | ( | ) |
Synchronize all of the processes in this group.
| Ref<MessageGrp> sc::ActiveMessageGrp::messagegrp | ( | ) | [inline] |
Return the MessageGrp used to implement the ActiveMessageGrp.