.TH "sc::RDMAMemoryGrp" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::RDMAMemoryGrp \- The \fBRDMAMemoryGrp\fP abstract class specializes the \fBMsgMemoryGrp\fP class\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::MsgMemoryGrp\fP\&. .PP Inherited by \fBsc::ARMCIMemoryGrp\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBRDMAMemoryGrp\fP (const \fBRef\fP< \fBMessageGrp\fP > &msg)" .br .ti -1c .RI "\fBRDMAMemoryGrp\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .ti -1c .RI "void * \fBlocaldata\fP ()" .br .RI "Returns a pointer to the local data\&. " .ti -1c .RI "void \fBset_localsize\fP (size_t \fBlocalsize\fP)" .br .RI "Set the size of locally held memory\&. " .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 * \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 \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 \fBsum_reduction\fP (double *data, \fBdistsize_t\fP doffset, int dsize)" .br .ti -1c .RI "void \fBsum_reduction_on_node\fP (double *data, size_t doffset, int dsize, int node=\-1)" .br .ti -1c .RI "void \fBprint\fP (std::ostream &o=\fBExEnv::out0\fP()) const" .br .RI "Prints out information about the object\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBretrieve_data\fP (void *, int node, int \fBoffset\fP, int \fBsize\fP, int lock)=0" .br .ti -1c .RI "virtual void \fBreplace_data\fP (void *, int node, int \fBoffset\fP, int \fBsize\fP, int unlock)=0" .br .ti -1c .RI "virtual void \fBsum_data\fP (double *data, int node, int doffset, int dsize)=0" .br .ti -1c .RI "void * \fBmalloc_region\fP (size_t nbyte)" .br .ti -1c .RI "void \fBfree_region\fP (void *)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "char * \fBdata_\fP" .br .ti -1c .RI "std::vector< \fBPool\fP * > \fBpools_\fP" .br .ti -1c .RI "size_t \fBdefault_pool_size_\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBRDMAMemoryGrp\fP abstract class specializes the \fBMsgMemoryGrp\fP class\&. It uses RDMA to implement global shared memory\&. .br .SH "Member Function Documentation" .PP .SS "void* sc::RDMAMemoryGrp::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::RDMAMemoryGrp::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::RDMAMemoryGrp::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\&.