Struct HipMallocManagedAllocator¶
Defined in File HipMallocManagedAllocator.hpp
Struct Documentation¶
-
struct
umpire::alloc::HipMallocManagedAllocator¶ Uses hipMallocManaged and hipFree to allocate and deallocate unified memory on AMD GPUs.
Public Functions
-
void *
allocate(std::size_t bytes)¶ Allocate bytes of memory using hipMallocManaged.
- 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 hipFree.
- Parameters
ptr: Address to deallocate.
- Exceptions
umpire::util::Exception: if memory be free’d.
-
void *