OmniSciDB
b24e664e58
|
#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_ |
Definition at line 36 of file ThrustAllocator.h.
|
private |
Definition at line 55 of file ThrustAllocator.h.
using ThrustAllocator::value_type = int8_t |
Definition at line 38 of file ThrustAllocator.h.
|
inline |
Definition at line 39 of file ThrustAllocator.h.
ThrustAllocator::~ThrustAllocator | ( | ) |
Definition at line 71 of file ThrustAllocator.cpp.
References CHECK_EQ, data_mgr_, default_alloc_scoped_buffers_, Data_Namespace::DataMgr::free(), and scoped_buffers_.
int8_t * ThrustAllocator::allocate | ( | std::ptrdiff_t | num_bytes | ) |
Definition at line 24 of file ThrustAllocator.cpp.
References CudaAllocator::allocGpuAbstractBuffer(), CHECK(), CHECK_EQ, data_mgr_, device_id_, Data_Namespace::AbstractBuffer::getMemoryPtr(), and raw_to_ab_ptr_.
Referenced by BaselineJoinHashTable::fetchColumn(), and JoinHashTable::fetchFragments().
int8_t * ThrustAllocator::allocateScopedBuffer | ( | std::ptrdiff_t | num_bytes | ) |
Definition at line 55 of file ThrustAllocator.cpp.
References CudaAllocator::allocGpuAbstractBuffer(), CHECK_EQ, data_mgr_, default_alloc_scoped_buffers_, device_id_, Data_Namespace::AbstractBuffer::getMemoryPtr(), and scoped_buffers_.
Referenced by OverlapsJoinHashTable::approximateTupleCount(), BaselineJoinHashTable::approximateTupleCount(), anonymous_namespace{ResultSetSortImpl.cu}::get_device_copy_ptr(), OverlapsJoinHashTable::initHashTableOnGpu(), BaselineJoinHashTable::initHashTableOnGpu(), transfer_object_to_gpu(), and transfer_pod_vector_to_gpu().
void ThrustAllocator::deallocate | ( | int8_t * | ptr, |
size_t | num_bytes | ||
) |
Definition at line 41 of file ThrustAllocator.cpp.
References CHECK(), CHECK_EQ, data_mgr_, Data_Namespace::DataMgr::free(), and raw_to_ab_ptr_.
|
inline |
Definition at line 48 of file ThrustAllocator.h.
References data_mgr_.
Referenced by anonymous_namespace{ResultSetSortImpl.cu}::get_device_copy_ptr(), transfer_object_to_gpu(), and transfer_pod_vector_to_gpu().
|
inline |
Definition at line 50 of file ThrustAllocator.h.
References device_id_.
Referenced by anonymous_namespace{ResultSetSortImpl.cu}::get_device_copy_ptr(), transfer_object_to_gpu(), and transfer_pod_vector_to_gpu().
|
private |
Definition at line 53 of file ThrustAllocator.h.
Referenced by allocate(), allocateScopedBuffer(), deallocate(), getDataMgr(), and ~ThrustAllocator().
|
private |
Definition at line 58 of file ThrustAllocator.h.
Referenced by allocateScopedBuffer(), and ~ThrustAllocator().
|
private |
Definition at line 54 of file ThrustAllocator.h.
Referenced by allocate(), allocateScopedBuffer(), and getDeviceId().
|
private |
Definition at line 56 of file ThrustAllocator.h.
Referenced by allocate(), and deallocate().
|
private |
Definition at line 57 of file ThrustAllocator.h.
Referenced by allocateScopedBuffer(), and ~ThrustAllocator().