|
UMPIRE
Umpire: resource management and provision
|
Uses cudaMallocManaged and cudaFree to allocate and deallocate unified memory on NVIDIA GPUs. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/alloc/CudaMallocManagedAllocator.hpp>
Public Member Functions | |
| void * | allocate (std::size_t bytes) |
| Allocate bytes of memory using cudaMallocManaged. More... | |
| void | deallocate (void *ptr) |
| Deallocate memory using cudaFree. More... | |
| bool | isAccessible (Platform p) |
Uses cudaMallocManaged and cudaFree to allocate and deallocate unified memory on NVIDIA GPUs.
|
inline |
Allocate bytes of memory using cudaMallocManaged.
| 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.
|
inline |
Deallocate memory using cudaFree.
| ptr | Address to deallocate. |
| umpire::util::runtime_error | if memory be free'd. |
References umpire::util::message::Debug, umpire::error(), UMPIRE_ERROR, and UMPIRE_LOG.
|
inline |