Struct OpenMPTargetAllocator¶
Defined in File OpenMPTargetAllocator.hpp
Struct Documentation¶
-
struct
umpire::alloc
::
OpenMPTargetAllocator
¶ Uses malloc and free to allocate and deallocate CPU memory.
Public Functions
-
OpenMPTargetAllocator
(int _device)¶
-
void *
allocate
(std::size_t bytes)¶ Allocate bytes of memory using malloc.
- 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 free.
- Parameters
ptr
: Address to deallocate.
- Exceptions
umpire::util::Exception
: if memory cannot be free’d.
Public Members
-
int
device
¶
-