OmniSciDB
bf83d84833
|
#include <CudaAllocator.h>
Public Member Functions | |
CudaAllocator (Data_Namespace::DataMgr *data_mgr, const int device_id) | |
~CudaAllocator () override | |
int8_t * | alloc (const size_t num_bytes) override |
void | free (Data_Namespace::AbstractBuffer *ab) const override |
void | copyToDevice (int8_t *device_dst, const int8_t *host_src, const size_t num_bytes) const override |
void | copyFromDevice (int8_t *host_dst, const int8_t *device_src, const size_t num_bytes) const override |
void | zeroDeviceMem (int8_t *device_ptr, const size_t num_bytes) const override |
void | setDeviceMem (int8_t *device_ptr, unsigned char uc, const size_t num_bytes) const override |
![]() | |
Allocator () | |
virtual | ~Allocator () |
Static Public Member Functions | |
static Data_Namespace::AbstractBuffer * | allocGpuAbstractBuffer (Data_Namespace::DataMgr *data_mgr, const size_t num_bytes, const int device_id) |
static void | freeGpuAbstractBuffer (Data_Namespace::DataMgr *data_mgr, Data_Namespace::AbstractBuffer *ab) |
Private Attributes | |
std::vector < Data_Namespace::AbstractBuffer * > | owned_buffers_ |
Data_Namespace::DataMgr * | data_mgr_ |
int | device_id_ |
Definition at line 43 of file CudaAllocator.h.
CudaAllocator::CudaAllocator | ( | Data_Namespace::DataMgr * | data_mgr, |
const int | device_id | ||
) |
Definition at line 24 of file CudaAllocator.cpp.
References CHECK, data_mgr_, and Data_Namespace::DataMgr::getCudaMgr().
|
override |
Definition at line 34 of file CudaAllocator.cpp.
References CHECK, data_mgr_, Data_Namespace::DataMgr::free(), and owned_buffers_.
|
overridevirtual |
Implements Allocator.
Definition at line 57 of file CudaAllocator.cpp.
References allocGpuAbstractBuffer(), CHECK, data_mgr_, device_id_, and owned_buffers_.
Referenced by OverlapsJoinHashTable::approximateTupleCount(), BaselineJoinHashTable::approximateTupleCount(), anonymous_namespace{TableFunctionExecutionContext.cpp}::create_literal_buffer(), BaselineJoinHashTableBuilder::initHashTableOnGpu(), transfer_flat_object_to_gpu(), and transfer_vector_of_flat_objects_to_gpu().
|
static |
Definition at line 41 of file CudaAllocator.cpp.
References Data_Namespace::DataMgr::alloc(), CHECK, CHECK_EQ, and Data_Namespace::GPU_LEVEL.
Referenced by alloc(), ThrustAllocator::allocate(), PerfectHashTable::allocateGpuMemory(), ThrustAllocator::allocateScopedBuffer(), BaselineHashTable::BaselineHashTable(), and InValuesBitmap::InValuesBitmap().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 76 of file CudaAllocator.cpp.
References CHECK, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
Referenced by OverlapsJoinHashTable::computeBucketSizes().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 68 of file CudaAllocator.cpp.
References CHECK, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
Referenced by anonymous_namespace{TableFunctionExecutionContext.cpp}::create_literal_buffer(), transfer_flat_object_to_gpu(), and transfer_vector_of_flat_objects_to_gpu().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 64 of file CudaAllocator.cpp.
References data_mgr_, and Data_Namespace::DataMgr::free().
|
static |
Definition at line 51 of file CudaAllocator.cpp.
References CHECK, and Data_Namespace::DataMgr::free().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 90 of file CudaAllocator.cpp.
References CHECK, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 84 of file CudaAllocator.cpp.
References CHECK, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
|
private |
Definition at line 78 of file CudaAllocator.h.
Referenced by alloc(), copyFromDevice(), copyToDevice(), CudaAllocator(), free(), setDeviceMem(), zeroDeviceMem(), and ~CudaAllocator().
|
private |
Definition at line 79 of file CudaAllocator.h.
Referenced by alloc(), copyFromDevice(), copyToDevice(), setDeviceMem(), and zeroDeviceMem().
|
private |
Definition at line 76 of file CudaAllocator.h.
Referenced by alloc(), and ~CudaAllocator().