|
UMPIRE
Umpire: resource management and provision
|
Uses hipMallocManaged and hipFree to allocate and deallocate unified memory on AMD GPUs. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/alloc/HipMallocManagedAllocator.hpp>

Public Member Functions | |
| void * | allocate (std::size_t bytes) |
| Allocate bytes of memory using hipMallocManaged. More... | |
| void | deallocate (void *ptr) |
| Deallocate memory using hipFree. More... | |
| bool | isAccessible (Platform p) |
| HipAllocator () | |
| HipAllocator (MemoryResourceTraits::granularity_type g) | |
Public Attributes | |
| MemoryResourceTraits::granularity_type | m_granularity |
Uses hipMallocManaged and hipFree to allocate and deallocate unified memory on AMD GPUs.
|
inline |
Allocate bytes of memory using hipMallocManaged.
| bytes | Number of bytes to allocate. |
| umpire::util::runtime_error | if memory cannot be allocated. |
References umpire::MemoryResourceTraits::coarse_grained, umpire::util::message::Debug, umpire::error(), umpire::alloc::HipAllocator::m_granularity, UMPIRE_ERROR, and UMPIRE_LOG.
Referenced by umpire::resource::HipUnifiedMemoryResource::allocate().
|
inline |
Deallocate memory using hipFree.
| 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.
Referenced by umpire::resource::HipUnifiedMemoryResource::deallocate().
|
inline |
|
inline |
|
inline |
|
inherited |