File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,24 @@ SCENARIO("Subranges", "[subranges::simple]")
100
100
REQUIRE (elements_equal_to<3 >(next (begin (r)), end (r)));
101
101
}
102
102
}
103
+
104
+ WHEN (" skipping the first 25 elements and taking the next 50 elements of both buffers" )
105
+ {
106
+ auto r0 = skip<1 >({25 });
107
+ auto r1 = take<1 >({50 });
108
+ buffer<int , 1 > buf_out{size};
109
+
110
+ in_buf_a | r0 | r1 | t0 << (in_buf_b | r0 | r1) | buf_out | submit_to (q);
111
+
112
+ THEN (" the first and last 25 elements are zero and the rest is 3" )
113
+ {
114
+ const auto r = copy_to_host (q, buf_out);
115
+ REQUIRE (r.size () == in_buf_a.get_range ().size ());
116
+ REQUIRE (elements_equal_to<0 >(begin (r), begin (r) + 25 ));
117
+ REQUIRE (elements_equal_to<3 >(begin (r) + 25 , begin (r) + 75 ));
118
+ REQUIRE (elements_equal_to<0 >(begin (r) + 75 , end (r)));
119
+ }
120
+ }
103
121
}
104
122
105
123
GIVEN (" A 2d buffer of 100 ones and a transform kernel which adds 5" )
You can’t perform that action at this time.
0 commit comments