Struct SyclMallocManagedAllocator¶
Defined in File SyclMallocManagedAllocator.hpp
Struct Documentation¶
-
struct
umpire::alloc
::
SyclMallocManagedAllocator
¶ Uses sycl_shared and sycl_free to allocate and deallocate unified shared memory (USM) on Intel GPUs.
Public Functions
-
void *
allocate
(std::size_t bytes, const cl::sycl::queue &queue_t)¶ Allocate bytes of memory using cl::sycl::malloc_shared.
- 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 *usm_ptr, const cl::sycl::queue &queue_t)¶ Deallocate memory using cl::sycl::free.
- Parameters
usm_ptr
: Address to deallocate.
- Exceptions
umpire::util::Exception
: if memory be free’d.
-
void *