DPC++ Runtime
Runtime libraries for oneAPI DPC++
property_traits.hpp
Go to the documentation of this file.
1
//==------------ property_traits.hpp --- SYCL property traits --------------==//
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/detail/property_helper.hpp
>
12
13
namespace
sycl
{
14
__SYCL_INLINE_VER_NAMESPACE
(_V1) {
15
16
// Property traits
17
template
<
typename
propertyT>
18
struct
is_property
19
:
public
std::bool_constant
<
20
std::is_base_of_v<detail::DataLessPropertyBase, propertyT> ||
21
std::is_base_of_v<detail::PropertyWithDataBase, propertyT>> {};
22
23
template
<
typename
propertyT,
typename
syclObjectT>
24
struct
is_property_of
:
public
std::false_type {};
25
26
template
<
typename
propertyT>
27
inline
constexpr
bool
is_property_v
=
is_property<propertyT>::value
;
28
29
template
<
typename
propertyT,
typename
syclObjectT>
30
inline
constexpr
bool
is_property_of_v
=
31
is_property_of<propertyT, syclObjectT>::value
;
32
33
}
// __SYCL_INLINE_VER_NAMESPACE(_V1)
34
}
// namespace sycl
sycl::_V1::is_property
Definition:
property_traits.hpp:18
sycl::_V1::detail::bool_constant
std::integral_constant< bool, V > bool_constant
Definition:
stl_type_traits.hpp:40
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition:
defines_elementary.hpp:11
sycl::_V1::is_property_of
Definition:
property_traits.hpp:24
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition:
access.hpp:14
sycl::_V1::is_property_of_v
constexpr bool is_property_of_v
Definition:
property_traits.hpp:30
property_helper.hpp
sycl::_V1::is_property_v
constexpr bool is_property_v
Definition:
property_traits.hpp:27
include
sycl
properties
property_traits.hpp
Generated by
1.8.17