Struct SyclMallocAllocator¶
Defined in File SyclMallocAllocator.hpp
Struct Documentation¶
-
struct
umpire::alloc
::
SyclMallocAllocator
¶ Uses sycl’s malloc and free to allocate and deallocate memory on Intel GPUs.
Public Functions
-
void *
allocate
(std::size_t size, const cl::sycl::queue &queue_t)¶ Allocate bytes of memory using SYCL malloc
- Return
Pointer to start of the allocation on device.
- Parameters
size
: Number of bytes to allocate.queue_t
: SYCL queue for providing information on device and context
- Exceptions
umpire::util::Exception
: if memory cannot be allocated.
-
void
deallocate
(void *ptr, const cl::sycl::queue &queue_t)¶ Deallocate memory using SYCL free.
- Parameters
ptr
: Address to deallocate.queue_t
: SYCL queue this pointer was asociated with
- Exceptions
umpire::util::Exception
: if memory cannot be free’d.
-
void *