OmniSciDB
a5dc49c757
|
#include <CudaAllocator.h>
Public Member Functions | |
CudaAllocator (Data_Namespace::DataMgr *data_mgr, const int device_id, CUstream cuda_stream) | |
~CudaAllocator () override | |
int8_t * | alloc (const size_t num_bytes) override |
void | free (Data_Namespace::AbstractBuffer *ab) const override |
void | copyToDevice (void *device_dst, const void *host_src, const size_t num_bytes) const override |
void | copyFromDevice (void *host_dst, const void *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 |
Public Member Functions inherited from Allocator | |
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_ |
CUstream | cuda_stream_ |
Definition at line 42 of file CudaAllocator.h.
CudaAllocator::CudaAllocator | ( | Data_Namespace::DataMgr * | data_mgr, |
const int | device_id, | ||
CUstream | cuda_stream | ||
) |
Definition at line 24 of file CudaAllocator.cpp.
References CHECK, data_mgr_, and Data_Namespace::DataMgr::getCudaMgr().
|
override |
Definition at line 36 of file CudaAllocator.cpp.
References CHECK, data_mgr_, Data_Namespace::DataMgr::free(), and owned_buffers_.
|
overridevirtual |
Implements Allocator.
Definition at line 59 of file CudaAllocator.cpp.
References allocGpuAbstractBuffer(), CHECK, data_mgr_, device_id_, and owned_buffers_.
|
static |
Definition at line 43 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(), TreeModelPredictionMgr::createKernelBuffers(), and StringDictionaryTranslationMgr::createKernelBuffers().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 79 of file CudaAllocator.cpp.
References CHECK, cuda_stream_, data_mgr_, and Data_Namespace::DataMgr::getCudaMgr().
Referenced by anonymous_namespace{BoundingBoxIntersectJoinHashTable.cpp}::compute_bucket_sizes().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 70 of file CudaAllocator.cpp.
References CHECK, cuda_stream_, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 66 of file CudaAllocator.cpp.
References data_mgr_, and Data_Namespace::DataMgr::free().
|
static |
Definition at line 53 of file CudaAllocator.cpp.
References CHECK, and Data_Namespace::DataMgr::free().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 94 of file CudaAllocator.cpp.
References CHECK, cuda_stream_, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
|
overridevirtual |
Implements DeviceAllocator.
Definition at line 88 of file CudaAllocator.cpp.
References CHECK, cuda_stream_, data_mgr_, device_id_, and Data_Namespace::DataMgr::getCudaMgr().
|
private |
Definition at line 81 of file CudaAllocator.h.
Referenced by copyFromDevice(), copyToDevice(), setDeviceMem(), and zeroDeviceMem().
|
private |
Definition at line 79 of file CudaAllocator.h.
Referenced by alloc(), copyFromDevice(), copyToDevice(), CudaAllocator(), free(), setDeviceMem(), zeroDeviceMem(), and ~CudaAllocator().
|
private |
Definition at line 80 of file CudaAllocator.h.
Referenced by alloc(), copyToDevice(), setDeviceMem(), and zeroDeviceMem().
|
private |
Definition at line 77 of file CudaAllocator.h.
Referenced by alloc(), and ~CudaAllocator().