We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ac969a commit 4b55818Copy full SHA for 4b55818
testing/tuple_algorithms.cu
@@ -16,6 +16,16 @@ struct custom_square
16
}
17
};
18
19
+void test_tuple_subset()
20
+{
21
+ auto t0 = std::make_tuple(0, 2, 3.14);
22
+
23
+ auto t1 = thrust::tuple_subset(t0, std::index_sequence<2, 0>{});
24
25
+ ASSERT_EQUAL_QUIET(t1, std::make_tuple(3.14, 0));
26
+}
27
+DECLARE_UNITTEST(test_tuple_subset);
28
29
void test_tuple_transform()
30
{
31
auto t0 = std::make_tuple(0, 2, 3.14);
@@ -25,6 +35,16 @@ void test_tuple_transform()
35
ASSERT_EQUAL_QUIET(t1, std::make_tuple(0, 4, 9.8596));
36
37
DECLARE_UNITTEST(test_tuple_transform);
38
39
+void test_tuple_for_each()
40
41
+ auto t = std::make_tuple(0, 2, 3.14);
42
43
+ thrust::tuple_for_each(t, [](auto& x) { x *= x; });
44
45
+ ASSERT_EQUAL_QUIET(t, std::make_tuple(0, 4, 9.8596));
46
47
+DECLARE_UNITTEST(test_tuple_for_each);
48
49
#endif // THRUST_CPP_DIALECT >= 2011
50
0 commit comments