DPC++ Runtime
Runtime libraries for oneAPI DPC++
usm_impl.hpp
Go to the documentation of this file.
1 //==-------------- usm_impl.hpp - SYCL USM Utils ---------------*- C++ -*---==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 // ===--------------------------------------------------------------------=== //
8 #pragma once
9 
10 #include <sycl/detail/common.hpp>
11 #include <sycl/detail/export.hpp>
12 #include <sycl/usm/usm_enums.hpp>
13 
14 namespace sycl {
16 namespace detail {
17 namespace usm {
18 
19 __SYCL_EXPORT void *alignedAlloc(size_t Alignment, size_t Bytes,
20  const context &Ctxt, const device &Dev,
21  sycl::usm::alloc Kind,
22  const code_location &CL);
23 
24 __SYCL_EXPORT void *alignedAllocHost(size_t Alignment, size_t Bytes,
25  const context &Ctxt, sycl::usm::alloc Kind,
26  const code_location &CL);
27 
28 __SYCL_EXPORT void free(void *Ptr, const context &Ctxt,
29  const code_location &CL);
30 
31 } // namespace usm
32 } // namespace detail
33 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
34 } // namespace sycl
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:39
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
Definition: device.hpp:47
#define __SYCL_INLINE_VER_NAMESPACE(X)
void * alignedAllocHost(size_t Alignment, size_t Bytes, const context &Ctxt, sycl::usm::alloc Kind, const code_location &CL)
void * alignedAlloc(size_t Alignment, size_t Bytes, const context &Ctxt, const device &Dev, sycl::usm::alloc Kind, const code_location &CL)
void free(void *Ptr, const context &Ctxt, const code_location &CL)
Definition: usm_impl.cpp:221
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14