.TH "sc::ShmMessageGrp" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::ShmMessageGrp \- The \fBShmMessageGrp\fP class is an implementation of \fBMessageGrp\fP that allows multiple process to be started that communicate with shared memory\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::intMessageGrp\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBShmMessageGrp\fP ()" .br .RI "Reads the number of processors from environmental variable NUMPROC\&. " .ti -1c .RI "\fBShmMessageGrp\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .RI "The \fBShmMessageGrp\fP \fBKeyVal\fP constructor takes a single keyword that specifies the number of processors\&. " .ti -1c .RI "\fBShmMessageGrp\fP (int nprocs)" .br .RI "Initialize \fBShmMessageGrp\fP to use nprocs processors\&. " .ti -1c .RI "void \fBsync\fP ()" .br .RI "Synchronize all of the processors\&. " .ti -1c .RI "\fBRef\fP< \fBMessageGrp\fP > \fBclone\fP (void)" .br .RI "Returns a copy of this \fBMessageGrp\fP specialization that provides an independent communication context\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBbasic_send\fP (int target, int type, const void *data, int nbyte)" .br .RI "Must be implemented by specializations\&. " .ti -1c .RI "void \fBbasic_recv\fP (int type, void *data, int nbyte)" .br .RI "Must be implemented by specializations\&. " .ti -1c .RI "int \fBbasic_probe\fP (int type)" .br .RI "Must be implemented by specializations\&. " .ti -1c .RI "void \fBinitialize\fP (int nprocs)" .br .ti -1c .RI "void \fBinitialize\fP ()" .br .ti -1c .RI "\fBmsgbuf_t\fP * \fBNEXT_MESSAGE\fP (\fBmsgbuf_t\fP *m)" .br .ti -1c .RI "void \fBget_change\fP (int node)" .br .ti -1c .RI "void \fBput_change\fP (int node)" .br .ti -1c .RI "void \fBwait_for_write\fP (int node)" .br .ti -1c .RI "void \fBrelease_write\fP (int node)" .br .ti -1c .RI "void \fBprint_buffer\fP (int node, int \fBme\fP)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBcommbuf_t\fP * \fBcommbuf\fP [MAXPROCS]" .br .ti -1c .RI "int \fBshmid\fP" .br .ti -1c .RI "int \fBsemid\fP" .br .ti -1c .RI "int \fBchange_semid\fP" .br .ti -1c .RI "void * \fBsharedmem\fP" .br .ti -1c .RI "struct sembuf \fBsemdec\fP" .br .ti -1c .RI "struct sembuf \fBseminc\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBShmMessageGrp\fP class is an implementation of \fBMessageGrp\fP 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\&. .SH "Constructor & Destructor Documentation" .PP .SS "sc::ShmMessageGrp::ShmMessageGrp (const \fBRef\fP< \fBKeyVal\fP > &)" .PP The \fBShmMessageGrp\fP \fBKeyVal\fP constructor takes a single keyword that specifies the number of processors\&. Here is an example of a \fBParsedKeyVal\fP input that creates a \fBShmMessageGrp\fP that runs on four processors: .PP .PP .nf message: n = 4 .fi .PP .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.