MPQC  3.0.0-alpha
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:
sc::DescribedClass sc::RefCount sc::FockBuildAMG

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. More...
 
void send (int node, const Ref< StateSend > &, const Ref< ActiveMessage > &)
 Send the active message to node. More...
 
void activate ()
 Make the object ready to process messages. More...
 
void deactivate ()
 Processes all outstanding messages and disable processing of messages. More...
 
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.
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const MPQC__NOEXCEPT
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
virtual void print (std::ostream &=ExEnv::out0()) const
 Print the object.
 
Ref< DescribedClassref ()
 Return this object wrapped up in a Ref smart pointer. More...
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Protected Member Functions

void init (const Ref< MessageGrp > &msg, const Ref< ThreadGrp > &thr)
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

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.

Member Function Documentation

◆ activate()

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.

◆ deactivate()

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.

◆ get_statesend()

Ref<StateSend> sc::ActiveMessageGrp::get_statesend ( )

Each thread using the ActiveMessageGrp needs its own StateSend object.

This cannot be called concurrently by multiple threads.

◆ send()

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.


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

Generated at Sun Jan 26 2020 23:24:03 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.