DASH  0.3.0
Global Dynamic Memory Concept

Concept of distributed dynamic global memory space shared by units in a specified team. More...

Classes

class  dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >
 Global memory region with dynamic size. More...
 

Functions

 dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem (size_type n_local_elem=0)
 Constructor, collectively allocates the given number of elements in local memory of every unit in dash::Team::All(). More...
 
 dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem (size_type n_local_elem, dash::Team &team)
 Constructor, collectively allocates the given number of elements in local memory of every unit in a team. More...
 
 dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem (size_type n_local_elem, LocalMemorySpace *r)
 Constructor, collectively allocates the given number of elements in local memory of every unit in dash::Team::All(). More...
 

Detailed Description

Concept of distributed dynamic global memory space shared by units in a specified team.

Description

Extends the Global Memory concept by dynamic address spaces.

Units can change the capacity of the global memory space by resizing their own local segment of the global memory space. Resizing local memory segments (methods resize, grow and shrink) is non-collective, however the resulting changes to local and global memory space are only immediately visible to the unit that executed the resize operation.

The collective operation commit synchronizes changes on local memory spaces between all units such that new allocated memory segments are attached in global memory and deallocated segments detached, respectively.

Newly allocated memory segments are unattached and immediately accessible by the local unit only. Deallocated memory is immediately removed from the local unit's memory space but remains accessible for remote units.

Different from typical dynamic container semantics, neither resizing the memory space nor commit operations invalidate iterators to elements in allocated global memory. An iterators referencing a remote element in global dynamic memory is only invalidated in the commit operation following the deallocation of the element's memory segment.

Types
Type Name Description
GlobalRAI Random access iterator on global address space
LocalRAI Random access iterator on a single local address space
Methods
Return Type Method Parameters Description
void resize size lsize_new Resize the local segment of the global memory space to the specified number of values.
void grow size lsize_diff Extend the size of the local segment of the global memory space by the specified number of values.
void shrink size lsize_diff Reduce the size of the local segment of the global memory space by the specified number of values.
void commit nbsp; Publish changes to local memory across all units.
Methods inherited from Global Memory concept
Return Type Method Parameters Description
GlobalRAI begin   Global pointer to the initial address of the global memory space
GlobalRAI end   Global pointer past the final element in the global memory space
LocalRAI lbegin   Local pointer to the initial address in the local segment of the global memory space
LocalRAI lbegin unit u Local pointer to the initial address in the local segment at unit u of the global memory space
LocalRAI lend   Local pointer past the final element in the local segment of the global memory space
LocalRAI lend unit u Local pointer past the final element in the local segment at unit u of the global memory space
GlobalRAI at index gidx Global pointer to the element at canonical global offset gidx in the global memory space
void put_value value & v_in, index gidx Stores value specified in parameter v_in to address in global memory at canonical global offset gidx
void get_value value * v_out, index gidx Loads value from address in global memory at canonical global offset gidx into local address v_out
void barrier   Blocking synchronization of all units associated with the global memory instance

Function Documentation

◆ GlobHeapMem() [1/3]

template<typename ElementType , class LocalMemorySpace = dash::HostSpace, global_allocation_policy AllocationPolicy = global_allocation_policy::epoch_synchronized, template< class > class LocalAlloc = allocator::DefaultAllocator>
dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem ( size_type  n_local_elem = 0)
inline

#include </tmp/tmporruphar/dash/include/dash/memory/GlobHeapMem.h>

Constructor, collectively allocates the given number of elements in local memory of every unit in dash::Team::All().

Implemented concept:
Global Dynamic Memory Concept
Implemented concept:
DashMemorySpaceConcept
Parameters
n_local_elemInitial number of local elements to allocate in global memory space

Definition at line 308 of file GlobHeapMem.h.

311  : GlobHeapMem(n_local_elem, nullptr)
312  {
313  }
GlobHeapMem(size_type n_local_elem=0)
Constructor, collectively allocates the given number of elements in local memory of every unit in das...
Definition: GlobHeapMem.h:308

◆ GlobHeapMem() [2/3]

template<typename ElementType , class LocalMemorySpace = dash::HostSpace, global_allocation_policy AllocationPolicy = global_allocation_policy::epoch_synchronized, template< class > class LocalAlloc = allocator::DefaultAllocator>
dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem ( size_type  n_local_elem,
dash::Team team 
)
inline

#include </tmp/tmporruphar/dash/include/dash/memory/GlobHeapMem.h>

Constructor, collectively allocates the given number of elements in local memory of every unit in a team.

Implemented concept:
Global Dynamic Memory Concept
Implemented concept:
DashMemorySpaceConcept
Parameters
n_local_elemInitial number of local elements to allocate in global memory space
teamThe specified team

Definition at line 322 of file GlobHeapMem.h.

327  : GlobHeapMem(n_local_elem, nullptr, team)
328  {
329  }
GlobHeapMem(size_type n_local_elem=0)
Constructor, collectively allocates the given number of elements in local memory of every unit in das...
Definition: GlobHeapMem.h:308

◆ GlobHeapMem() [3/3]

template<typename ElementType , class LocalMemorySpace = dash::HostSpace, global_allocation_policy AllocationPolicy = global_allocation_policy::epoch_synchronized, template< class > class LocalAlloc = allocator::DefaultAllocator>
dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem ( size_type  n_local_elem,
LocalMemorySpace *  r 
)
inline

#include </tmp/tmporruphar/dash/include/dash/memory/GlobHeapMem.h>

Constructor, collectively allocates the given number of elements in local memory of every unit in dash::Team::All().

The underlying memory space is specified by the resource which is passed in

Implemented concept:
Global Dynamic Memory Concept
Implemented concept:
DashMemorySpaceConcept
Parameters
n_local_elemInitial number of local elements to allocate in global memory space
rThe underlying local memory space

Definition at line 339 of file GlobHeapMem.h.

References dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::commit(), dash::Team::dart_id(), dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::grow(), dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::local, dash::Team::size(), and dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::team().

344  : GlobHeapMem(n_local_elem, r, dash::Team::All())
345  {
346  }
GlobHeapMem(size_type n_local_elem=0)
Constructor, collectively allocates the given number of elements in local memory of every unit in das...
Definition: GlobHeapMem.h:308
static Team & All()
The invariant Team instance containing all available units.
Definition: Team.h:213