DPC++ Runtime
Runtime libraries for oneAPI DPC++
dealloc.hpp
Go to the documentation of this file.
1
//==------------- dealloc.hpp - SYCL annotated usm deallocation ------------==//
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
9
#pragma once
10
11
#include <
sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp
>
12
#include <
sycl/usm.hpp
>
13
14
namespace
sycl
{
15
inline
namespace
_V1 {
16
namespace
ext {
17
namespace
oneapi {
18
namespace
experimental {
19
21
// Deallocation
23
template
<
typename
T,
typename
propList>
24
void
free
(
annotated_ptr<T, propList>
&ptr,
const
context
&syclContext) {
25
sycl::free
(ptr.get(), syclContext);
26
}
27
28
template
<
typename
T,
typename
propList>
29
void
free
(
annotated_ptr<T, propList>
&ptr,
const
queue
&syclQueue) {
30
sycl::free
(ptr.get(), syclQueue);
31
}
32
33
}
// namespace experimental
34
}
// namespace oneapi
35
}
// namespace ext
36
}
// namespace _V1
37
}
// namespace sycl
annotated_ptr.hpp
sycl::_V1::context
The context class represents a SYCL context on which kernel functions may be executed.
Definition:
context.hpp:50
sycl::_V1::ext::oneapi::experimental::annotated_ptr
Definition:
annotated_ptr.hpp:254
sycl::_V1::queue
Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
Definition:
queue.hpp:105
sycl::_V1::ext::oneapi::experimental::free
void free(annotated_ptr< T, propList > &ptr, const context &syclContext)
Definition:
dealloc.hpp:24
sycl::_V1::free
void free(void *ptr, const context &ctxt, const detail::code_location &CodeLoc=detail::code_location::current())
Definition:
usm_impl.cpp:374
sycl
Definition:
access.hpp:18
usm.hpp
include
sycl
ext
oneapi
experimental
annotated_usm
dealloc.hpp
Generated by
1.9.1