sycl::malloc_device
void* sycl::aligned_alloc_device( size_t alignment, size_t size, const sycl::queue& q );
template <typename T> T* sycl::aligned_alloc_device( size_t alignment, size_t count, const sycl::queue& q );
size_t num_bytes |
Number of bytes to allocate |
size_t count |
Number of elements of type T to allocate |
const sycl::device& dev |
The SYCL device on which to allocate |
const sycl::context& ctxt |
The SYCL context to which device belongs |
Returns a pointer to the newly allocated memory on the specified device on success. Memory allocated by sycl::malloc_device must be deallocated with sycl::free to avoid memory leaks.
Returns nullptr on failure.