24 namespace Buffer_Namespace {
27 BufferList::iterator seg_it,
30 const size_t page_size,
31 const size_t num_bytes)
32 :
Buffer(bm, seg_it, device_id, page_size, num_bytes), cuda_mgr_(cuda_mgr) {}
35 const size_t num_bytes,
38 const int dst_device_id) {
41 dst,
mem_ + offset, num_bytes);
42 }
else if (dst_buffer_type ==
GPU_LEVEL) {
47 LOG(
FATAL) <<
"Unsupported buffer type";
52 const size_t num_bytes,
55 const int src_device_id) {
62 }
else if (src_buffer_type ==
GPU_LEVEL) {
68 LOG(
FATAL) <<
"Unsupported buffer type";
void copyHostToDevice(int8_t *device_ptr, const int8_t *host_ptr, const size_t num_bytes, const int device_num, CUstream cuda_stream=0)
Note(s): Forbid Copying Idiom 4.1.
void readData(int8_t *const dst, const size_t num_bytes, const size_t offset=0, const MemoryLevel dst_buffer_type=CPU_LEVEL, const int dst_devic_id=-1) override
void copyDeviceToDevice(int8_t *dest_ptr, int8_t *src_ptr, const size_t num_bytes, const int dest_device_num, const int src_device_num, CUstream cuda_stream=0)
void copyDeviceToHost(int8_t *host_ptr, const int8_t *device_ptr, const size_t num_bytes, CUstream cuda_stream=0)
void writeData(int8_t *const src, const size_t num_bytes, const size_t offset=0, const MemoryLevel src_buffer_type=CPU_LEVEL, const int src_device_id=-1) override
CudaMgr_Namespace::CudaMgr * cuda_mgr_
GpuCudaBuffer(BufferMgr *bm, BufferList::iterator seg_it, const int device_id, CudaMgr_Namespace::CudaMgr *cuda_mgr, const size_t page_size=512, const size_t num_bytes=0)
Note(s): Forbid Copying Idiom 4.1.