Uses sycl's malloc_host and free to allocate and deallocate pinned memory on host.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/alloc/SyclPinnedAllocator.hpp>
Uses sycl's malloc_host and free to allocate and deallocate pinned memory on host.
◆ allocate()
| void* umpire::alloc::SyclPinnedAllocator::allocate |
( |
std::size_t |
size, |
|
|
const sycl::queue & |
queue_t |
|
) |
| |
|
inline |
Allocate bytes of memory using SYCL malloc_host.
- Parameters
-
| size | Number of bytes to allocate. |
| queue_t | SYCL queue for providing information on device and context |
- Returns
- Pointer to start of the allocation on host.
- Exceptions
-
| umpire::util::runtime_error | if memory cannot be allocated. |
References umpire::util::message::Debug, UMPIRE_ERROR, and UMPIRE_LOG.
◆ deallocate()
| void umpire::alloc::SyclPinnedAllocator::deallocate |
( |
void * |
ptr, |
|
|
const sycl::queue & |
queue_t |
|
) |
| |
|
inline |
Deallocate memory using SYCL free.
- Parameters
-
| ptr | Address to deallocate. |
| queue_t | SYCL queue this pointer was asociated with |
- Exceptions
-
| umpire::util::runtime_error | if memory cannot be free'd. |
References umpire::util::message::Debug, umpire::free(), and UMPIRE_LOG.
◆ isAccessible()
| bool umpire::alloc::SyclPinnedAllocator::isAccessible |
( |
Platform |
p | ) |
|
|
inline |