OmniSciDB
a5dc49c757
|
#include <ThrustAllocator.h>
Public Types | |
using | value_type = int8_t |
Public Member Functions | |
ThrustAllocator (Data_Namespace::DataMgr *mgr, const int id) | |
~ThrustAllocator () | |
int8_t * | allocate (std::ptrdiff_t num_bytes) |
void | deallocate (int8_t *ptr, size_t num_bytes) |
int8_t * | allocateScopedBuffer (std::ptrdiff_t num_bytes) |
Data_Namespace::DataMgr * | getDataMgr () const |
int | getDeviceId () const |
Private Types | |
using | PtrMapperType = std::unordered_map< int8_t *, Data_Namespace::AbstractBuffer * > |
Private Attributes | |
Data_Namespace::DataMgr * | data_mgr_ |
const int | device_id_ |
PtrMapperType | raw_to_ab_ptr_ |
std::vector < Data_Namespace::AbstractBuffer * > | scoped_buffers_ |
std::vector< int8_t * > | default_alloc_scoped_buffers_ |
size_t | num_allocations_ {0} |
Definition at line 37 of file ThrustAllocator.h.
|
private |
Definition at line 56 of file ThrustAllocator.h.
using ThrustAllocator::value_type = int8_t |
Definition at line 39 of file ThrustAllocator.h.
|
inline |
Definition at line 40 of file ThrustAllocator.h.
ThrustAllocator::~ThrustAllocator | ( | ) |
Definition at line 86 of file ThrustAllocator.cpp.
References CHECK, CHECK_EQ, data_mgr_, default_alloc_scoped_buffers_, device_id_, logger::ERROR, Data_Namespace::DataMgr::free(), LOG, raw_to_ab_ptr_, scoped_buffers_, and VLOG.
int8_t * ThrustAllocator::allocate | ( | std::ptrdiff_t | num_bytes | ) |
Definition at line 29 of file ThrustAllocator.cpp.
References Data_Namespace::DataMgr::alloc(), CudaAllocator::allocGpuAbstractBuffer(), CHECK, CHECK_EQ, Data_Namespace::CPU_LEVEL, data_mgr_, device_id_, Data_Namespace::AbstractBuffer::getMemoryPtr(), Data_Namespace::AbstractBuffer::getPinCount(), num_allocations_, raw_to_ab_ptr_, and VLOG.
Referenced by Data_Namespace::detail::DataMgrMemoryResource< Pointer >::do_allocate().
int8_t * ThrustAllocator::allocateScopedBuffer | ( | std::ptrdiff_t | num_bytes | ) |
Definition at line 66 of file ThrustAllocator.cpp.
References Data_Namespace::DataMgr::alloc(), CudaAllocator::allocGpuAbstractBuffer(), CHECK_EQ, Data_Namespace::CPU_LEVEL, data_mgr_, default_alloc_scoped_buffers_, device_id_, Data_Namespace::AbstractBuffer::getMemoryPtr(), Data_Namespace::AbstractBuffer::getPinCount(), and scoped_buffers_.
Referenced by anonymous_namespace{ResultSetSortImpl.cu}::get_device_copy_ptr().
void ThrustAllocator::deallocate | ( | int8_t * | ptr, |
size_t | num_bytes | ||
) |
Definition at line 52 of file ThrustAllocator.cpp.
References CHECK, CHECK_EQ, data_mgr_, Data_Namespace::DataMgr::free(), and raw_to_ab_ptr_.
Referenced by Data_Namespace::detail::DataMgrMemoryResource< Pointer >::do_deallocate().
|
inline |
Definition at line 49 of file ThrustAllocator.h.
References data_mgr_.
Referenced by anonymous_namespace{ResultSetSortImpl.cu}::get_device_copy_ptr().
|
inline |
Definition at line 51 of file ThrustAllocator.h.
References device_id_.
Referenced by anonymous_namespace{ResultSetSortImpl.cu}::get_device_copy_ptr().
|
private |
Definition at line 54 of file ThrustAllocator.h.
Referenced by allocate(), allocateScopedBuffer(), deallocate(), getDataMgr(), and ~ThrustAllocator().
|
private |
Definition at line 59 of file ThrustAllocator.h.
Referenced by allocateScopedBuffer(), and ~ThrustAllocator().
|
private |
Definition at line 55 of file ThrustAllocator.h.
Referenced by allocate(), allocateScopedBuffer(), getDeviceId(), and ~ThrustAllocator().
|
private |
Definition at line 60 of file ThrustAllocator.h.
Referenced by allocate().
|
private |
Definition at line 57 of file ThrustAllocator.h.
Referenced by allocate(), deallocate(), and ~ThrustAllocator().
|
private |
Definition at line 58 of file ThrustAllocator.h.
Referenced by allocateScopedBuffer(), and ~ThrustAllocator().