32 #ifndef _util_group_memproc_h 33 #define _util_group_memproc_h 35 #include <sys/types.h> 37 #include <util/group/memmsg.h> void set_localsize(size_t)
Set the size of locally held memory.
The ProcMemoryGrp concrete class provides an implementation of MemoryGrp for a single processor...
Definition: memproc.h:43
A template class that maintains references counts.
Definition: ref.h:332
The MemoryGrp abstract class provides a way of accessing distributed memory in a parallel machine...
Definition: memory.h:124
void * localdata()
Returns a pointer to the local data.
int size(int node)
Returns the amount of memory residing on node.
Definition: memory.h:165
void sync()
Synchronizes all the nodes.
void release_readonly(void *data, distsize_t offset, int size)
This is called when read access is no longer needed.
distsize_t offset(int node)
Returns the global offset to node's memory.
Definition: memory.h:168
void * obtain_readonly(distsize_t offset, int size)
This gives read access to the memory location. No locking is done.
void release_readwrite(void *data, distsize_t offset, int size)
This is called when read/write access is no longer needed.
void release_writeonly(void *data, distsize_t offset, int size)
This is called when write access is no longer needed.
void * obtain_writeonly(distsize_t offset, int size)
This gives write access to the memory location. No locking is done.
void * obtain_readwrite(distsize_t offset, int size)
Only one thread can have an unreleased obtain_readwrite at a time.