Struct HipMallocAllocator

Struct Documentation

struct umpire::alloc::HipMallocAllocator

Uses hipMalloc and hipFree to allocate and deallocate memory on AMD GPUs.

Public Functions

void *allocate(std::size_t size)

Allocate bytes of memory using hipMalloc.

Return

Pointer to start of the allocation.

Parameters
  • bytes: Number of bytes to allocate.

Exceptions

void deallocate(void *ptr)

Deallocate memory using hipFree.

Parameters
  • ptr: Address to deallocate.

Exceptions