kokkos-utils
0.0.5
Toggle main menu visibility
Loading...
Searching...
No Matches
View.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_UTILS_CONCEPTS_VIEW_HPP
2
#define KOKKOS_UTILS_CONCEPTS_VIEW_HPP
3
4
#include <concepts>
5
6
#include "Kokkos_View.hpp"
7
8
#include "
kokkos-utils/impl/type_traits.hpp
"
9
10
namespace
Kokkos::utils::concepts
11
{
12
14
template
<
typename
T>
15
concept
View
= Kokkos::is_view_v<T>;
16
18
template
<
typename
T, std::
size_t
Rank>
19
concept
ViewOfRank
=
View<T>
&& T::rank() == Rank;
20
22
template
<
typename
T>
23
concept
ModifiableView
=
View<T>
&& ! std::is_const_v<typename T::value_type>;
24
26
template
<
typename
T,
typename
ValueType>
27
concept
ViewOf
=
View<T>
&& std::same_as<typename T::value_type, ValueType>;
28
30
template
<
typename
T,
template
<
typename
...>
class
U>
31
concept
ViewOfInstanceOf
=
View<T>
&&
impl::InstanceOf<typename T::value_type, U>
;
32
33
}
// namespace Kokkos::utils::concepts
34
35
#endif
// KOKKOS_UTILS_CONCEPTS_VIEW_HPP
Kokkos::utils::concepts::ModifiableView
Specify that a type is a modifiable Kokkos::View.
Definition
View.hpp:23
Kokkos::utils::concepts::ViewOfInstanceOf
Specify that a type is a Kokkos::View, whose value type is an instance of a given class template U.
Definition
View.hpp:31
Kokkos::utils::concepts::ViewOfRank
Specify that a type is a Kokkos::View of given rank Rank.
Definition
View.hpp:19
Kokkos::utils::concepts::ViewOf
Specify that a type is a Kokkos::View with value type ValueType.
Definition
View.hpp:27
Kokkos::utils::concepts::View
Specify that a type is a Kokkos::View.
Definition
View.hpp:15
Kokkos::utils::impl::InstanceOf
Definition
type_traits.hpp:32
Kokkos::utils::concepts
Definition
DualView.hpp:7
type_traits.hpp
include
kokkos-utils
concepts
View.hpp
Generated on
for kokkos-utils by
1.18.0