|
UMPIRE
Umpire: resource management and provision
|
Uses cudaMalloc and cudaFree to allocate and deallocate memory on NVIDIA GPUs. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/alloc/CudaMallocAllocator.hpp>
Public Member Functions | |
| void * | allocate (std::size_t size) |
| Allocate bytes of memory using cudaMalloc. More... | |
| void | deallocate (void *ptr) |
| Deallocate memory using cudaFree. More... | |
Uses cudaMalloc and cudaFree to allocate and deallocate memory on NVIDIA GPUs.
|
inline |
Allocate bytes of memory using cudaMalloc.
| bytes | Number of bytes to allocate. |
| umpire::util::runtime_error | if memory cannot be allocated. |
References umpire::util::message::Debug, umpire::error(), UMPIRE_ERROR, and UMPIRE_LOG.
Referenced by umpire::resource::CudaDeviceMemoryResource::allocate().
|
inline |
Deallocate memory using cudaFree.
| ptr | Address to deallocate. |
| umpire::util::runtime_error | if memory cannot be free'd. |
References umpire::util::message::Debug, umpire::error(), UMPIRE_ERROR, and UMPIRE_LOG.
Referenced by umpire::resource::CudaDeviceMemoryResource::deallocate().