kokkos-utils
0.0.5
Toggle main menu visibility
Loading...
Searching...
No Matches
type_traits.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_UTILS_IMPL_TYPE_TRAITS_HPP
2
#define KOKKOS_UTILS_IMPL_TYPE_TRAITS_HPP
3
4
#include <type_traits>
5
14
15
namespace
Kokkos::utils::impl
16
{
17
25
template
<
class
T,
template
<
typename
...>
class
U>
26
inline
constexpr
bool
is_instance_of_v
= std::false_type{};
27
28
template
<
template
<
typename
...>
class
U,
typename
... Vs>
29
inline
constexpr
bool
is_instance_of_v
<U<Vs...>, U> = std::true_type{};
30
31
template
<
typename
T,
template
<
typename
...>
class
U>
32
concept
InstanceOf
=
is_instance_of_v<T, U>
;
34
36
template
<
typename
T,
typename
... Ts>
37
concept
IsTypeOneOf
= std::disjunction_v<std::is_same<T, Ts>...>;
38
39
}
// namespace Kokkos::utils::impl
40
41
#endif
// KOKKOS_UTILS_IMPL_TYPE_TRAITS_HPP
Kokkos::utils::impl::InstanceOf
Definition
type_traits.hpp:32
Kokkos::utils::impl::IsTypeOneOf
Check if T is the same as one of the types Ts.
Definition
type_traits.hpp:37
Kokkos::utils::impl
Definition
type_list.hpp:13
Kokkos::utils::impl::is_instance_of_v
constexpr bool is_instance_of_v
Definition
type_traits.hpp:26
include
kokkos-utils
impl
type_traits.hpp
Generated on
for kokkos-utils by
1.18.0