.TH "sc::ShmMemoryGrp" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::ShmMemoryGrp \- The \fBShmMemoryGrp\fP concrete class provides an implementation of \fBMsgMemoryGrp\fP\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::MsgMemoryGrp\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBShmMemoryGrp\fP (const \fBRef\fP< \fBMessageGrp\fP > &msg)" .br .ti -1c .RI "\fBShmMemoryGrp\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .ti -1c .RI "void \fBset_localsize\fP (size_t)" .br .RI "Set the size of locally held memory\&. " .ti -1c .RI "void * \fBlocaldata\fP ()" .br .RI "Returns a pointer to the local data\&. " .ti -1c .RI "void * \fBobtain_readwrite\fP (\fBdistsize_t\fP \fBoffset\fP, int \fBsize\fP)" .br .RI "Only one thread can have an unreleased obtain_readwrite at a time\&. " .ti -1c .RI "void * \fBobtain_readonly\fP (\fBdistsize_t\fP \fBoffset\fP, int \fBsize\fP)" .br .RI "This gives read access to the memory location\&. No locking is done\&. " .ti -1c .RI "void * \fBobtain_writeonly\fP (\fBdistsize_t\fP \fBoffset\fP, int \fBsize\fP)" .br .RI "This gives write access to the memory location\&. No locking is done\&. " .ti -1c .RI "void \fBrelease_readonly\fP (void *data, \fBdistsize_t\fP \fBoffset\fP, int \fBsize\fP)" .br .RI "This is called when read access is no longer needed\&. " .ti -1c .RI "void \fBrelease_writeonly\fP (void *data, \fBdistsize_t\fP \fBoffset\fP, int \fBsize\fP)" .br .RI "This is called when write access is no longer needed\&. " .ti -1c .RI "void \fBrelease_readwrite\fP (void *data, \fBdistsize_t\fP \fBoffset\fP, int \fBsize\fP)" .br .RI "This is called when read/write access is no longer needed\&. " .ti -1c .RI "void \fBprint\fP (std::ostream &o=\fBExEnv::out0\fP()) const" .br .RI "Prints out information about the object\&. " .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBShmMemoryGrp\fP concrete class provides an implementation of \fBMsgMemoryGrp\fP\&. It uses SYSV IPC to provided shared memory in a system that provide shared memory in hardware\&. It is very fast and reliable\&. .SH "Member Function Documentation" .PP .SS "void* sc::ShmMemoryGrp::obtain_readwrite (\fBdistsize_t\fP offset, int size)\fC [virtual]\fP" .PP Only one thread can have an unreleased obtain_readwrite at a time\&. The actual memory region locked can be larger than that requested\&. If the memory region is already locked this will block\&. For this reason, data should be held as read/write for as short a time as possible\&. .PP Implements \fBsc::MemoryGrp\fP\&. .SS "void sc::ShmMemoryGrp::release_readwrite (void * data, \fBdistsize_t\fP offset, int size)\fC [virtual]\fP" .PP This is called when read/write access is no longer needed\&. The memory will be unlocked\&. .PP Implements \fBsc::MemoryGrp\fP\&. .SS "void sc::ShmMemoryGrp::set_localsize (size_t)\fC [virtual]\fP" .PP Set the size of locally held memory\&. When memory is accessed using a global offset counting starts at node 0 and proceeds up to node \fBn()\fP - 1\&. .PP Reimplemented from \fBsc::MsgMemoryGrp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.