|
UMPIRE
Umpire: resource management and provision
|
Uses malloc and free to allocate and deallocate CPU memory. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/alloc/OpenMPTargetAllocator.hpp>
Public Member Functions | |
| OpenMPTargetAllocator (int _device) | |
| void * | allocate (std::size_t bytes) |
| Allocate bytes of memory using malloc. More... | |
| void | deallocate (void *ptr) |
| Deallocate memory using free. More... | |
| bool | isAccessible (Platform p) |
Public Attributes | |
| int | device |
Uses malloc and free to allocate and deallocate CPU memory.
|
inline |
|
inline |
Allocate bytes of memory using malloc.
| bytes | Number of bytes to allocate. |
| umpire::util::runtime_error | if memory cannot be allocated. |
References umpire::util::message::Debug, device, UMPIRE_ERROR, and UMPIRE_LOG.
|
inline |
Deallocate memory using free.
| ptr | Address to deallocate. |
| umpire::util::runtime_error | if memory cannot be free'd. |
References umpire::util::message::Debug, device, and UMPIRE_LOG.
|
inline |
| int umpire::alloc::OpenMPTargetAllocator::device |
Referenced by allocate(), and deallocate().