Class Data_Namespace::detail::DataMgrMemoryResource¶
-
template<typename
Pointer
>
classDataMgrMemoryResource
: public thrust::mr::memory_resource<Pointer>¶ A thrust memory resource wrapped around a Data_Namespace::ThrustAllocator that allocates memory via DataMgr. This memory resource wrapper is required to properly use ThrustAllocator as a custom allocator for thrust device containers like thrust::device_vector.
Public Functions
-
DataMgrMemoryResource
(ThrustAllocator &thrust_allocator)¶
-
DataMgrMemoryResource
(const DataMgrMemoryResource &other)¶
-
~DataMgrMemoryResource
()¶
-
Pointer
do_allocate
(std::size_t bytes, std::size_t alignment = THRUST_MR_DEFAULT_ALIGNMENT)¶ Overrides a pure virtual function defined in thrust::mr::memory_resource to allocate from a ThrustAllocator.
-
void
do_deallocate
(Pointer p, std::size_t bytes, std::size_t alignment)¶ Overrides a pure virtual function defined in thrust::mr::memory_resource to deallocate memory from a ThrustAllocator.
-
__host__ __device__ const ThrustAllocator* Data_Namespace::detail::DataMgrMemoryResource::getThrustAllocator() const
Private Types
-
template<>
usingbase
= thrust::mr::memory_resource<Pointer>¶
Private Members
-
ThrustAllocator *
thrust_allocator_
¶
-