33 #ifndef _util_group_memrdma_h 34 #define _util_group_memrdma_h 39 #include <util/group/pool.h> 40 #include <util/group/memmsg.h> 50 virtual void retrieve_data(
void *,
int node,
int offset,
int size,
52 virtual void replace_data(
void *,
int node,
int offset,
int size,
54 virtual void sum_data(
double *data,
int node,
int doffset,
int dsize) = 0;
56 std::vector<Pool*> pools_;
57 size_t default_pool_size_;
58 void* malloc_region(
size_t nbyte);
59 void free_region(
void*);
76 void sum_reduction(
double *data,
distsize_t doffset,
int dsize);
77 void sum_reduction_on_node(
double *data,
size_t doffset,
int dsize,
void * obtain_readwrite(distsize_t offset, int size)
Only one thread can have an unreleased obtain_readwrite at a time.
void * obtain_readonly(distsize_t offset, int size)
This gives read access to the memory location. No locking is done.
A template class that maintains references counts.
Definition: ref.h:332
void release_writeonly(void *data, distsize_t offset, int size)
This is called when write access is no longer needed.
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 set_localsize(size_t localsize)
Set the size of locally held memory.
static std::ostream & out0()
Return an ostream that writes from node 0.
A MsgMemoryGrp that initializes its data using a messagegrp.
Definition: memmsg.h:41
void release_readwrite(void *data, distsize_t offset, int size)
This is called when read/write access is no longer needed.
The RDMAMemoryGrp abstract class specializes the MsgMemoryGrp class.
Definition: memrdma.h:46
distsize_t offset(int node)
Returns the global offset to node's memory.
Definition: memory.h:168
void print(std::ostream &o=ExEnv::out0()) const
Prints out information about the object.
size_t localsize()
Returns the amount of memory residing locally on me().
Definition: memory.h:159
void release_readonly(void *data, distsize_t offset, int size)
This is called when read 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.