DASH  0.3.0
dash::GlobStaticMem< LMemSpace > Class Template Reference

Global memory with address space of static size. More...

#include <GlobStaticMem.h>

Public Types

using memory_space_domain_category = typename base_t::memory_space_domain_category
 
using memory_space_type_category = typename base_t::memory_space_type_category
 
using size_type = dash::default_size_t
 
using index_type = dash::default_index_t
 
using difference_type = index_type
 
using memory_space_allocation_policy = allocation_static
 
using memory_space_synchronization_policy = synchronization_collective
 
using memory_space_layout_tag = memory_space_contiguous
 
using allocator_type = std::pmr::polymorphic_allocator< std::byte >
 
using void_pointer = dash::GlobPtr< void, GlobStaticMem >
 
using const_void_pointer = dash::GlobPtr< const void, GlobStaticMem >
 
using local_void_pointer = void *
 
using const_local_void_pointer = const void *
 

Public Member Functions

constexpr GlobStaticMem (dash::Team const &team)
 
 GlobStaticMem (LMemSpace *r, dash::Team const &team)
 
 GlobStaticMem (const GlobStaticMem &)=delete
 
GlobStaticMemoperator= (const GlobStaticMem &)=delete
 
constexpr GlobStaticMem (GlobStaticMem &&other) noexcept
 
GlobStaticMemoperator= (GlobStaticMem &&) noexcept=default
 
constexpr size_type capacity () const noexcept
 
constexpr size_type capacity (dash::team_unit_t uid) const noexcept
 
constexpr void_pointer begin () noexcept
 
constexpr const_void_pointer begin () const noexcept
 
constexpr void_pointer end () noexcept
 
constexpr const_void_pointer end () const noexcept
 
void_pointer allocate (size_type nbytes, size_type alignment=max_align)
 
void deallocate (void_pointer gptr, size_type nbytes, size_type alignment=max_align)
 
constexpr dash::Team const & team () const noexcept
 
constexpr void barrier () const
 
allocator_type get_allocator () const
 
constexpr void flush (void_pointer ptr, dash::team_unit_t unit=dash::team_unit_t{}) const
 Complete all outstanding non-blocking operations to either all units or a specified unit. More...
 
DASH_CONSTEXPR void flush_local (void_pointer ptr, dash::team_unit_t unit=dash::team_unit_t{}) const
 Locally complete all outstanding non-blocking operations to all units. More...
 

Detailed Description

template<class LMemSpace>
class dash::GlobStaticMem< LMemSpace >

Global memory with address space of static size.

For global memory spaces with support for resizing, see dash::GlobHeapMem.

See also
dash::GlobHeapMem
Implemented concept:
DashMemorySpaceConcept

Definition at line 88 of file GlobStaticMem.h.

Member Function Documentation

◆ flush()

template<class LMemSpace>
constexpr void dash::GlobStaticMem< LMemSpace >::flush ( void_pointer  ptr,
dash::team_unit_t  unit = dash::team_unit_t{} 
) const
inline

Complete all outstanding non-blocking operations to either all units or a specified unit.

Definition at line 213 of file GlobStaticMem.h.

214  {}) const
215  {
216  if (unit == dash::team_unit_t{}) {
217  dart_flush_all(static_cast<dart_gptr_t>(ptr));
218  }
219  else {
220  auto gptr = static_cast<dart_gptr_t>(ptr);
221  // DASH_ASSERT_EQ(gptr.teamid, m_team->dart_id(), "invalid pointer to
222  // flush");
223  gptr.unitid = unit.id;
224  dart_flush(gptr);
225  }
226  }
dart_unit_t unitid
The unit holding the memory element.
Definition: dart_globmem.h:83
dart_ret_t dart_flush_all(dart_gptr_t gptr)
Guarantee completion of all outstanding operations involving a segment on all units.
DART Global pointer type.
Definition: dart_globmem.h:77
struct dash::unit_id< dash::local_unit, dart_team_unit_t > team_unit_t
Unit ID to use for team-local IDs.
Definition: Types.h:319
dart_ret_t dart_flush(dart_gptr_t gptr)
Guarantee completion of all outstanding operations involving a segment on a certain unit...

◆ flush_local()

template<class LMemSpace>
DASH_CONSTEXPR void dash::GlobStaticMem< LMemSpace >::flush_local ( void_pointer  ptr,
dash::team_unit_t  unit = dash::team_unit_t{} 
) const
inline

Locally complete all outstanding non-blocking operations to all units.

Definition at line 231 of file GlobStaticMem.h.

232  {}) const
233  {
234  if (unit == dash::team_unit_t{}) {
235  dart_flush_local_all(static_cast<dart_gptr_t>(ptr));
236  }
237  else {
238  auto gptr = static_cast<dart_gptr_t>(ptr);
239  DASH_ASSERT_EQ(
240  gptr.teamid, m_team->dart_id(), "invalid pointer to flush");
241  gptr.unitid = unit.id;
242  dart_flush_local(gptr);
243  }
244  }
dart_ret_t dart_flush_local(dart_gptr_t gptr)
Guarantee local completion of all outstanding operations involving a segment on a certain unit...
DART Global pointer type.
Definition: dart_globmem.h:77
struct dash::unit_id< dash::local_unit, dart_team_unit_t > team_unit_t
Unit ID to use for team-local IDs.
Definition: Types.h:319
dart_ret_t dart_flush_local_all(dart_gptr_t gptr)
Guarantee completion of all outstanding operations involving a segment on all units.
dart_team_t dart_id() const
Index of this team relative to global team dash::Team::All().
Definition: Team.h:522

The documentation for this class was generated from the following file: