OmniSciDB  2e3a973ef4
Data_Namespace::detail::TypedThrustAllocatorState Class Reference

Manages the underlying state of a TypedThrustAllocator. The state consists of: DataMgrMemoryResource: this instance holds onto a pointer of the ThrustAllocator which performs generic allocations thrust::device_ptr_memory_resource: this instance is an adapter that converts the pointer returned from the DataMgrMemoryResource to a thrust::device_ptr. More...

#include <TypedThrustAllocator.h>

+ Inheritance diagram for Data_Namespace::detail::TypedThrustAllocatorState:

Public Types

using Pointer = thrust::pointer< void, thrust::device_system_tag, thrust::use_default, thrust::use_default >
 
using DeviceResource = thrust::device_ptr_memory_resource< DataMgrMemoryResource< Pointer > >
 

Public Member Functions

 TypedThrustAllocatorState (ThrustAllocator &thrust_allocator)
 
 TypedThrustAllocatorState (const TypedThrustAllocatorState &other)
 
 TypedThrustAllocatorState (TypedThrustAllocatorState &&other)
 
__host__ __device__ void operator= (const TypedThrustAllocatorState &other)
 

Protected Attributes

DataMgrMemoryResource< Pointerdata_mgr_mem_rsrc_
 
DeviceResource device_rsrc_
 

Detailed Description

Manages the underlying state of a TypedThrustAllocator. The state consists of: DataMgrMemoryResource: this instance holds onto a pointer of the ThrustAllocator which performs generic allocations thrust::device_ptr_memory_resource: this instance is an adapter that converts the pointer returned from the DataMgrMemoryResource to a thrust::device_ptr.

Definition at line 83 of file TypedThrustAllocator.h.

Member Typedef Documentation

◆ DeviceResource

Definition at line 91 of file TypedThrustAllocator.h.

◆ Pointer

using Data_Namespace::detail::TypedThrustAllocatorState::Pointer = thrust:: pointer<void, thrust::device_system_tag, thrust::use_default, thrust::use_default>

Definition at line 86 of file TypedThrustAllocator.h.

Constructor & Destructor Documentation

◆ TypedThrustAllocatorState() [1/3]

Data_Namespace::detail::TypedThrustAllocatorState::TypedThrustAllocatorState ( ThrustAllocator thrust_allocator)
inline

◆ TypedThrustAllocatorState() [2/3]

Data_Namespace::detail::TypedThrustAllocatorState::TypedThrustAllocatorState ( const TypedThrustAllocatorState other)
inline

Definition at line 98 of file TypedThrustAllocator.h.

◆ TypedThrustAllocatorState() [3/3]

Data_Namespace::detail::TypedThrustAllocatorState::TypedThrustAllocatorState ( TypedThrustAllocatorState &&  other)
inline

Definition at line 101 of file TypedThrustAllocator.h.

102  : data_mgr_mem_rsrc_(std::move(other.data_mgr_mem_rsrc_))

Member Function Documentation

◆ operator=()

__host__ __device__ void Data_Namespace::detail::TypedThrustAllocatorState::operator= ( const TypedThrustAllocatorState other)
inline

Definition at line 105 of file TypedThrustAllocator.h.

References data_mgr_mem_rsrc_.

Referenced by Data_Namespace::TypedThrustAllocator< T >::operator=().

105  {
106  assert(data_mgr_mem_rsrc_.getThrustAllocator() ==
107  other.data_mgr_mem_rsrc_.getThrustAllocator());
108  // NOTE: only copying the data_mgr_mem_rsrc_
109  // The device_rsrc_ should have already been constructed with a poitner to the local
110  // data_mgr_mem_rsrc_ and is therefore up-to-date.
111  data_mgr_mem_rsrc_ = other.data_mgr_mem_rsrc_;
112  }
+ Here is the caller graph for this function:

Member Data Documentation

◆ data_mgr_mem_rsrc_

DataMgrMemoryResource<Pointer> Data_Namespace::detail::TypedThrustAllocatorState::data_mgr_mem_rsrc_
protected

Definition at line 117 of file TypedThrustAllocator.h.

Referenced by operator=().

◆ device_rsrc_

DeviceResource Data_Namespace::detail::TypedThrustAllocatorState::device_rsrc_
protected

Definition at line 118 of file TypedThrustAllocator.h.


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