#include <MemoryManager.h>
|
static void * | Malloc (size_t byte_size, const Device &device) |
|
static void | Free (void *ptr, const Device &device) |
| Frees previously allocated memory at address ptr on device device .
|
|
static void | Memcpy (void *dst_ptr, const Device &dst_device, const void *src_ptr, const Device &src_device, size_t num_bytes) |
|
static void | MemcpyFromHost (void *dst_ptr, const Device &dst_device, const void *host_ptr, size_t num_bytes) |
| Same as Memcpy, but with host (CPU:0) as default src_device.
|
|
static void | MemcpyToHost (void *host_ptr, const void *src_ptr, const Device &src_device, size_t num_bytes) |
| Same as Memcpy, but with host (CPU:0) as default dst_device.
|
|
Top-level memory interface. Calls to any of the member functions will automatically dispatch the appropriate MemoryManagerDevice instance based on the provided device which is used to execute the requested functionality.
The memory managers are dispatched as follows:
DeviceType = CPU : MemoryManagerCPU DeviceType = CUDA : ENABLE_CACHED_CUDA_MANAGER = ON : MemoryManagerCached w/ MemoryManagerCUDA Otherwise : MemoryManagerCUDA
◆ Free()
void open3d::core::MemoryManager::Free |
( |
void * |
ptr, |
|
|
const Device & |
device |
|
) |
| |
|
static |
Frees previously allocated memory at address ptr
on device device
.
◆ GetMemoryManagerDevice()
◆ Malloc()
void * open3d::core::MemoryManager::Malloc |
( |
size_t |
byte_size, |
|
|
const Device & |
device |
|
) |
| |
|
static |
Allocates memory of byte_size
bytes on device device
and returns a pointer to the beginning of the allocated memory block.
◆ Memcpy()
void open3d::core::MemoryManager::Memcpy |
( |
void * |
dst_ptr, |
|
|
const Device & |
dst_device, |
|
|
const void * |
src_ptr, |
|
|
const Device & |
src_device, |
|
|
size_t |
num_bytes |
|
) |
| |
|
static |
Copies num_bytes
bytes of memory at address src_ptr
on device src_device
to address dst_ptr
on device dst_device
.
◆ MemcpyFromHost()
void open3d::core::MemoryManager::MemcpyFromHost |
( |
void * |
dst_ptr, |
|
|
const Device & |
dst_device, |
|
|
const void * |
host_ptr, |
|
|
size_t |
num_bytes |
|
) |
| |
|
static |
Same as Memcpy, but with host (CPU:0) as default src_device.
◆ MemcpyToHost()
void open3d::core::MemoryManager::MemcpyToHost |
( |
void * |
host_ptr, |
|
|
const void * |
src_ptr, |
|
|
const Device & |
src_device, |
|
|
size_t |
num_bytes |
|
) |
| |
|
static |
Same as Memcpy, but with host (CPU:0) as default dst_device.
The documentation for this class was generated from the following files: