kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
test_DualView.cpp
Go to the documentation of this file.
1#include "gtest/gtest.h"
2
5
6using execution_space = Kokkos::DefaultExecutionSpace;
7
18
20{
21
23TEST(concepts, DualView)
24{
27
28 using dual_view_1d_t = Kokkos::DualView<int[5] , execution_space>;
29 using view_1d_t = Kokkos:: View<int[5] , execution_space>;
30 using dual_view_2d_t = Kokkos::DualView<int[5][5], execution_space>;
31 using view_2d_t = Kokkos:: View<int[5][5], execution_space>;
32
34 static_assert(DualView<dual_view_1d_t>);
35 static_assert(DualView<dual_view_2d_t>);
36
38 static_assert(! DualView<view_1d_t>);
39 static_assert(! DualView<view_2d_t>);
40
42 static_assert(! View<dual_view_1d_t>);
43 static_assert(! View<dual_view_2d_t>);
44}
45
46} // namespace Kokkos::utils::tests::concepts
Specify that a type is a Kokkos::DualView.
Definition DualView.hpp:11
Specify that a type is a Kokkos::View.
Definition View.hpp:15
Kokkos::DefaultExecutionSpace execution_space