DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
23 __SYCL_EXPORT
void *
malloc_device(
size_t size,
const device &dev,
26 malloc_device(
size_t size,
const device &dev,
const context &ctxt,
65 __SYCL_EXPORT
void *
malloc_shared(
size_t size,
const device &dev,
68 malloc_shared(
size_t size,
const device &dev,
const context &ctxt,
105 __SYCL_EXPORT
void *
malloc(
size_t size,
const device &dev,
const context &ctxt,
108 malloc(
size_t size,
const device &dev,
const context &ctxt,
usm::alloc kind,
110 __SYCL_EXPORT
void *
malloc(
size_t size,
const queue &q,
117 const device &dev,
const context &ctxt,
132 template <
typename T>
138 Dev, Ctxt, PropList, CodeLoc));
141 template <
typename T>
143 size_t Count,
const queue &Q,
150 template <
typename T>
156 Count *
sizeof(T), Dev, Ctxt,
160 template <
typename T>
169 template <
typename T>
171 size_t Count,
const context &Ctxt,
175 Ctxt, PropList, CodeLoc));
178 template <
typename T>
180 size_t Count,
const queue &Q,
183 return malloc_host<T>(Count, Q.
get_context(), PropList, CodeLoc);
186 template <
typename T>
192 Dev, Ctxt, PropList, CodeLoc));
195 template <
typename T>
197 size_t Count,
const queue &Q,
204 template <
typename T>
210 Count *
sizeof(T), Ctxt, PropList,
214 template <
typename T>
223 template <
typename T>
229 Count *
sizeof(T), Dev, Ctxt,
233 template <
typename T>
242 template <
typename T>
247 return static_cast<T *
>(
aligned_alloc(
alignof(T), Count *
sizeof(T), Dev,
248 Ctxt, Kind, PropList, CodeLoc));
251 template <
typename T>
260 template <
typename T>
267 Count *
sizeof(T), Dev, Ctxt, Kind,
271 template <
typename T>
277 Kind, PropList, CodeLoc);
Objects of the property_list class are containers for the SYCL properties.
T * aligned_alloc_device(size_t Alignment, size_t Count, const queue &Q, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
T * aligned_alloc_host(size_t Alignment, size_t Count, const queue &Q, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
#define __SYCL_INLINE_VER_NAMESPACE(X)
constexpr alignment_key::value_t< K > alignment
T * malloc(size_t Count, const queue &Q, usm::alloc Kind, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
---— Error handling, matching OpenCL plugin semantics.
simd< _Tp, _Abi > max(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
T * aligned_alloc_shared(size_t Alignment, size_t Count, const queue &Q, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
void free(void *ptr, const queue &q _CODELOCPARAM(&CodeLoc))
context get_context() const
T * aligned_alloc(size_t Alignment, size_t Count, const queue &Q, usm::alloc Kind, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
T * malloc_shared(size_t Count, const queue &Q, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
T * malloc_device(size_t Count, const queue &Q, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
T * malloc_host(size_t Count, const queue &Q, const property_list &PropList={} _CODELOCPARAM(&CodeLoc))
device get_device() const
The context class represents a SYCL context on which kernel functions may be executed.