DPC++ Runtime
Runtime libraries for oneAPI DPC++
usm_pointers.hpp
Go to the documentation of this file.
1
//==-------- usm_pointers.hpp - Extended SYCL pointers classes -------------==//
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/access/access.hpp
>
// for decorated, address_space
12
13
namespace
sycl
{
14
inline
namespace
_V1 {
15
16
template
<
typename
ElementType,
access::address_space
Space,
17
access::decorated
DecorateAddress>
18
class
multi_ptr
;
19
20
namespace
ext {
21
namespace
intel {
22
23
template
<
typename
ElementType,
24
access::decorated
IsDecorated = access::decorated::legacy>
25
using
device_ptr
=
26
multi_ptr
<ElementType,
access::address_space::ext_intel_global_device_space
,
27
IsDecorated>;
28
29
template
<
typename
ElementType,
30
access::decorated
IsDecorated = access::decorated::legacy>
31
using
host_ptr
=
32
multi_ptr
<ElementType,
access::address_space::ext_intel_global_host_space
,
33
IsDecorated>;
34
35
// Template specialization aliases for different pointer address spaces.
36
// The interface exposes non-decorated pointer while keeping the
37
// address space information internally.
38
39
template
<
typename
ElementType>
40
using
raw_device_ptr
=
41
multi_ptr
<ElementType,
access::address_space::ext_intel_global_device_space
,
42
access::decorated::no
>;
43
44
template
<
typename
ElementType>
45
using
raw_host_ptr
=
46
multi_ptr
<ElementType,
access::address_space::ext_intel_global_host_space
,
47
access::decorated::no
>;
48
49
// Template specialization aliases for different pointer address spaces.
50
// The interface exposes decorated pointer.
51
52
template
<
typename
ElementType>
53
using
decorated_device_ptr
=
54
multi_ptr
<ElementType,
access::address_space::ext_intel_global_device_space
,
55
access::decorated::yes
>;
56
57
template
<
typename
ElementType>
58
using
decorated_host_ptr
=
59
multi_ptr
<ElementType,
access::address_space::ext_intel_global_host_space
,
60
access::decorated::yes
>;
61
62
}
// namespace intel
63
}
// namespace ext
64
}
// namespace _V1
65
}
// namespace sycl
access.hpp
sycl::_V1::multi_ptr
Definition:
atomic.hpp:34
sycl::_V1::access::decorated
decorated
Definition:
access.hpp:63
sycl::_V1::access::decorated::no
@ no
sycl::_V1::access::decorated::yes
@ yes
sycl::_V1::access::address_space
address_space
Definition:
access.hpp:51
sycl::_V1::access::address_space::ext_intel_global_host_space
@ ext_intel_global_host_space
sycl::_V1::access::address_space::ext_intel_global_device_space
@ ext_intel_global_device_space
sycl::_V1::multi_ptr
multi_ptr()
Definition:
multi_ptr.hpp:468
sycl
Definition:
access.hpp:18
include
sycl
ext
intel
usm_pointers.hpp
Generated by
1.9.1