kokkos-utils 0.0.1
 
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
9
11{
12
14template <typename T>
15concept View = Kokkos::is_view_v<T>;
16
18template <typename T, std::size_t Rank>
19concept ViewOfRank = View<T> && T::rank() == Rank;
20
22template <typename T>
23concept ModifiableView = View<T> && ! std::is_const_v<typename T::value_type>;
24
26template <typename T, typename ValueType>
27concept ViewOf = View<T> && std::same_as<typename T::value_type, ValueType>;
28
30template <typename T, template <typename...> class U>
32
33} // namespace Kokkos::utils::concepts
34
35#endif // KOKKOS_UTILS_CONCEPTS_VIEW_HPP
Specify that a type is a modifiable Kokkos::View.
Definition View.hpp:23
Specify that a type is a Kokkos::View, whose value type is an instance of a given class template U.
Definition View.hpp:31
Specify that a type is a Kokkos::View of given rank Rank.
Definition View.hpp:19
Specify that a type is a Kokkos::View with value type ValueType.
Definition View.hpp:27
Specify that a type is a Kokkos::View.
Definition View.hpp:15