Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ShmMessageGrp Class Reference

The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process to be started that communicate with shared memory. More...

#include <messshm.h>

Inheritance diagram for ShmMessageGrp

Inheritance graph
[legend]
Collaboration diagram for ShmMessageGrp:

Collaboration graph
[legend]
List of all members.

Public Methods

 ShmMessageGrp ()
 ShmMessageGrp (const Ref< KeyVal > &)
 ShmMessageGrp (int nprocs)
 ~ShmMessageGrp ()
void sync ()
 Synchronize all of the processors.

int last_source ()
 Returns information about the last message received or probed.

int last_size ()
int last_type ()

Protected Methods

void basic_send (int target, int type, void *data, int nbyte)
 Must be implemented by specializations.

void basic_recv (int type, void *data, int nbyte)
 Must be implemented by specializations.

int basic_probe (int type)
 Must be implemented by specializations.

void initialize (int nprocs)
void initialize ()
void set_last_type (int a)
void set_last_source (int a)
void set_last_size (int a)

Protected Attributes

int last_type_
int last_source_
int last_size_

Detailed Description

The ShmMessageGrp class is an implementation of MessageGrp that allows multiple process to be started that communicate with shared memory.

This only provides improved performance if you have multiple CPU's in a symmetric multiprocessor configuration. Nonetheless, it is quite useful on a single CPU for tracking down bugs.

The ShmMessageGrp KeyVal constructor takes a single keyword that specifies the number of processors. Here is an example of a ParsedKeyVal input that creates a ShmMessageGrp that runs on four processors:

message<ShmMessageGrp>: n = 4


The documentation for this class was generated from the following file:
Generated at Thu Oct 4 18:09:54 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.