Struct SyclPinnedAllocator¶
Defined in File SyclPinnedAllocator.hpp
Struct Documentation¶
-
struct
umpire::alloc
::
SyclPinnedAllocator
¶ Uses sycl’s malloc_host and free to allocate and deallocate pinned memory on host.
Public Functions
-
void *
allocate
(std::size_t size, const cl::sycl::queue &queue_t)¶ Allocate bytes of memory using SYCL malloc_host
- Return
Pointer to start of the allocation on host.
- 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 *