DASH  0.3.0
HostSpace.h
1 #ifndef DASH__MEMORY__HOST_SPACE_H__INCLUDED
2 #define DASH__MEMORY__HOST_SPACE_H__INCLUDED
3 
4 #include <dash/memory/MemorySpaceBase.h>
5 
6 namespace dash {
7 
8 class HostSpace
9  : public dash::MemorySpace<memory_domain_local, memory_space_host_tag> {
10 public:
11  using void_pointer = void*;
12  using const_void_pointer = const void*;
13 
14 public:
15  HostSpace() = default;
16  HostSpace(HostSpace const& other) = default;
17  HostSpace(HostSpace&& other) = default;
18  HostSpace& operator=(HostSpace const& other) = default;
19  HostSpace& operator=(HostSpace&& other) = default;
20  ~HostSpace() = default;
21 
22 protected:
23  void* do_allocate(size_t bytes, size_t alignment) override;
24  void do_deallocate(void* p, size_t bytes, size_t alignment) override;
25  bool do_is_equal(std::pmr::memory_resource const& other) const
26  noexcept override;
27 };
28 
29 } // namespace dash
30 #endif // DASH__MEMORY__HOST_SPACE_H__INCLUDED
This class is a simple memory pool which holds allocates elements of size ValueType.
Definition: AllOf.h:8