Struct AmPinnedAllocator¶
Defined in File AmPinnedAllocator.hpp
Struct Documentation¶
-
struct
AmPinnedAllocator
¶ Uses hcAlloc and hcAlloc to allocate and deallocate memory on AMD GPUs that support ROCm.
Public Functions
-
void *
allocate
(std::size_t bytes)¶ Allocate bytes of pinned memory using am_alloc.
- Return
Pointer to start of the allocation.
- Parameters
bytes
: Number of bytes to allocate.
- Exceptions
umpire::util::Exception
: if memory cannot be allocated.
-
void
deallocate
(void *ptr)¶ Deallocate memory using am_free.
- Parameters
ptr
: Address to deallocate.
- Exceptions
umpire::util::Exception
: if memory cannot be free’d.
-
void *