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*);
static std::ostream & out0()
Return an ostream that writes from node 0.
int size(int node)
Returns the amount of memory residing on node.
Definition memory.h:161
distsize_t offset(int node)
Returns the global offset to node's memory.
Definition memory.h:164
size_t localsize()
Returns the amount of memory residing locally on me().
Definition memory.h:155
A MsgMemoryGrp that initializes its data using a messagegrp.
Definition memmsg.h:37
The RDMAMemoryGrp abstract class specializes the MsgMemoryGrp class.
Definition memrdma.h:42
void * obtain_writeonly(distsize_t offset, size_t size)
This gives write access to the memory location. No locking is done.
void release_writeonly(void *data, distsize_t offset, size_t size)
This is called when write access is no longer needed.
void set_localsize(size_t localsize)
Set the size of locally held memory.
void * obtain_readonly(distsize_t offset, size_t size)
This gives read access to the memory location. No locking is done.
void release_readonly(void *data, distsize_t offset, size_t size)
This is called when read access is no longer needed.
void * obtain_readwrite(distsize_t offset, size_t size)
Only one thread can have an unreleased obtain_readwrite at a time.
void sum_reduction(double *data, distsize_t doffset, size_t dsize)
Perform a sum reduction on double data.
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 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.
void * localdata()
Returns a pointer to the local data.
A template class that maintains references counts.
Definition ref.h:361
Contains all MPQC code up to version 3.
Definition mpqcin.h:14