Struct AmAllocAllocator

Struct Documentation

struct AmAllocAllocator

Uses hcAlloc and hcAlloc to allocate and deallocate memory on AMD GPUs that support ROCm.

Public Functions

void *allocate(size_t bytes)

Allocate bytes of memory using hcAlloc.

Return
Pointer to start of the allocation.
Parameters
  • bytes: Number of bytes to allocate.
Exceptions

void deallocate(void *ptr)

Deallocate memory using hcFree.

Parameters
  • ptr: Address to deallocate.
Exceptions