OmniSciDB
a5dc49c757
|
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. More...
#include <TypedThrustAllocator.h>
Public Member Functions | |
DataMgrMemoryResource (ThrustAllocator &thrust_allocator) | |
DataMgrMemoryResource (const DataMgrMemoryResource &other) | |
~DataMgrMemoryResource () final=default | |
Pointer | do_allocate (std::size_t bytes, std::size_t alignment=THRUST_MR_DEFAULT_ALIGNMENT) final |
Overrides a pure virtual function defined in thrust::mr::memory_resource to allocate from a ThrustAllocator. More... | |
void | do_deallocate (Pointer p, std::size_t bytes, std::size_t alignment) final |
Overrides a pure virtual function defined in thrust::mr::memory_resource to deallocate memory from a ThrustAllocator. More... | |
__host__ __device__ const ThrustAllocator * | getThrustAllocator () const |
Private Types | |
using | base = thrust::mr::memory_resource< Pointer > |
Private Attributes | |
ThrustAllocator * | thrust_allocator_ |
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.
Definition at line 35 of file TypedThrustAllocator.h.
|
private |
Definition at line 36 of file TypedThrustAllocator.h.
|
inline |
Definition at line 39 of file TypedThrustAllocator.h.
|
inline |
Definition at line 41 of file TypedThrustAllocator.h.
|
finaldefault |
|
inlinefinal |
Overrides a pure virtual function defined in thrust::mr::memory_resource to allocate from a ThrustAllocator.
Definition at line 49 of file TypedThrustAllocator.h.
References ThrustAllocator::allocate(), and Data_Namespace::detail::DataMgrMemoryResource< Pointer >::thrust_allocator_.
|
inlinefinal |
Overrides a pure virtual function defined in thrust::mr::memory_resource to deallocate memory from a ThrustAllocator.
Definition at line 61 of file TypedThrustAllocator.h.
References ThrustAllocator::deallocate(), and Data_Namespace::detail::DataMgrMemoryResource< Pointer >::thrust_allocator_.
|
inline |
Definition at line 68 of file TypedThrustAllocator.h.
References Data_Namespace::detail::DataMgrMemoryResource< Pointer >::thrust_allocator_.
|
private |