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
>
// for DataLessPropertyBase, Pro...
12
13
#include <type_traits>
// for bool_constant, false_type
14
15
namespace
sycl
{
16
inline
namespace
_V1 {
17
18
// Property traits
19
template
<
typename
propertyT>
20
struct
is_property
21
:
public
std::bool_constant<
22
std::is_base_of_v<detail::DataLessPropertyBase, propertyT> ||
23
std::is_base_of_v<detail::PropertyWithDataBase, propertyT>> {};
24
25
template
<
typename
propertyT,
typename
syclObjectT>
26
struct
is_property_of
:
public
std::false_type {};
27
28
template
<
typename
propertyT>
29
inline
constexpr
bool
is_property_v
=
is_property<propertyT>::value
;
30
31
template
<
typename
propertyT,
typename
syclObjectT>
32
inline
constexpr
bool
is_property_of_v
=
33
is_property_of<propertyT, syclObjectT>::value
;
34
35
}
// namespace _V1
36
}
// namespace sycl
sycl::_V1::is_property
Definition:
property_traits.hpp:20
sycl::_V1::is_property_of
Definition:
property_traits.hpp:26
sycl
Definition:
access.hpp:18
sycl::_V1::is_property_of_v
constexpr bool is_property_of_v
Definition:
property_traits.hpp:32
property_helper.hpp
sycl::_V1::is_property_v
constexpr bool is_property_v
Definition:
property_traits.hpp:29
include
sycl
properties
property_traits.hpp
Generated by
1.8.17