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 {
15 inline namespace _V1 {
16 namespace detail::usm {
17 
18 __SYCL_EXPORT void *alignedAlloc(size_t Alignment, size_t Bytes,
19  const context &Ctxt, const device &Dev,
20  sycl::usm::alloc Kind,
21  const code_location &CL);
22 
23 __SYCL_EXPORT void *alignedAllocHost(size_t Alignment, size_t Bytes,
24  const context &Ctxt, sycl::usm::alloc Kind,
25  const code_location &CL);
26 
27 __SYCL_EXPORT void free(void *Ptr, const context &Ctxt,
28  const code_location &CL);
29 
30 } // namespace detail::usm
31 } // namespace _V1
32 } // namespace sycl
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:51
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
Definition: device.hpp:66
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:297
Definition: access.hpp:18