29 #ifndef _util_group_memrdma_h
30 #define _util_group_memrdma_h
35 #include <util/group/pool.h>
36 #include <util/group/memmsg.h>
46 virtual void retrieve_data(
void *,
int node,
long offset,
long size,
48 virtual void replace_data(
void *,
int node,
long offset,
long size,
50 virtual void sum_data(
double *data,
int node,
long doffset,
long dsize) = 0;
52 std::vector<Pool*> pools_;
53 size_t default_pool_size_;
54 void* malloc_region(
size_t nbyte);
55 void free_region(
void*);
72 void sum_reduction(
double *data, distsize_t doffset,
size_t dsize);
void set_localsize(size_t localsize)
Set the size of locally held memory.
distsize_t offset(int node)
Returns the global offset to node's memory.
Definition: memory.h:164
void sum_reduction_on_node(double *data, size_t doffset, size_t dsize, int node=-1)
Perform a sum reduction on double data localized to a single node.
void * obtain_writeonly(distsize_t offset, size_t size)
This gives write access to the memory location. No locking is done.
A template class that maintains references counts.
Definition: ref.h:361
void * obtain_readonly(distsize_t offset, size_t size)
This gives read access to the memory location. No locking is done.
The RDMAMemoryGrp abstract class specializes the MsgMemoryGrp class.
Definition: memrdma.h:42
int size(int node)
Returns the amount of memory residing on node.
Definition: memory.h:161
void * localdata()
Returns a pointer to the local data.
void release_writeonly(void *data, distsize_t offset, size_t size)
This is called when write access is no longer needed.
void print(std::ostream &o=ExEnv::out0()) const
Prints out information about the object.
void release_readwrite(void *data, distsize_t offset, size_t size)
This is called when read/write access is no longer needed.
size_t localsize()
Returns the amount of memory residing locally on me().
Definition: memory.h:155
void sum_reduction(double *data, distsize_t doffset, size_t dsize)
Perform a sum reduction on double data.
static std::ostream & out0()
Return an ostream that writes from node 0.
A MsgMemoryGrp that initializes its data using a messagegrp.
Definition: memmsg.h:37
void * obtain_readwrite(distsize_t offset, size_t size)
Only one thread can have an unreleased obtain_readwrite at a time.
void release_readonly(void *data, distsize_t offset, size_t size)
This is called when read access is no longer needed.
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
Generated at Sun Jan 26 2020 23:24:01 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.