clang-format prev commit
MODIFY
test/test_set_intersection_by_key_descending.cpp
test/test_set_intersection_by_key_descending.cpp
* limitations under the License.
*/
-#include <thrust/set_operations.h>
#include <thrust/functional.h>
+#include <thrust/set_operations.h>
#include <thrust/sort.h>
#include "test_header.hpp"
@@ -33,20 +33,30 @@ TYPED_TEST(SetIntersectionByKeyDescendingTests, TestSetIntersectionByKeyDescendi
Vector a_key(3), b_key(4);
Vector a_val(3), b_val(4);
- a_key[0] = 4; a_key[1] = 2; a_key[2] = 0;
- a_val[0] = 0; a_val[1] = 0; a_val[2] = 0;
+ a_key[0] = 4;
+ a_key[1] = 2;
+ a_key[2] = 0;
+ a_val[0] = 0;
+ a_val[1] = 0;
+ a_val[2] = 0;
- b_key[0] = 4; b_key[1] = 3; b_key[2] = 3; b_key[3] = 0;
+ b_key[0] = 4;
+ b_key[1] = 3;
+ b_key[2] = 3;
+ b_key[3] = 0;
Vector ref_key(2), ref_val(2);
- ref_key[0] = 4; ref_key[1] = 0;
- ref_val[0] = 0; ref_val[1] = 0;
+ ref_key[0] = 4;
+ ref_key[1] = 0;
+ ref_val[0] = 0;
+ ref_val[1] = 0;
Vector result_key(2), result_val(2);
- thrust::pair<Iterator,Iterator> end =
- thrust::set_intersection_by_key(a_key.begin(), a_key.end(),
- b_key.begin(), b_key.end(),
+ thrust::pair<Iterator, Iterator> end = thrust::set_intersection_by_key(a_key.begin(),
+ a_key.end(),
+ b_key.begin(),
+ b_key.end(),
a_val.begin(),
result_key.begin(),
result_val.begin(),
@@ -69,7 +79,6 @@ TYPED_TEST(SetIntersectionByKeyDescendingPrimitiveTests, TestSetIntersectionByKe
thrust::host_vector<T> temp = get_random_data<T>(
2 * size, std::numeric_limits<T>::min(), std::numeric_limits<T>::max());
-
thrust::host_vector<T> h_a_key(temp.begin(), temp.begin() + size);
thrust::host_vector<T> h_b_key(temp.begin() + size, temp.end());
@@ -87,18 +96,18 @@ TYPED_TEST(SetIntersectionByKeyDescendingPrimitiveTests, TestSetIntersectionByKe
thrust::host_vector<T> h_result_key(size), h_result_val(size);
thrust::device_vector<T> d_result_key(size), d_result_val(size);
- thrust::pair<
- typename thrust::host_vector<T>::iterator,
- typename thrust::host_vector<T>::iterator
- > h_end;
+ thrust::pair<typename thrust::host_vector<T>::iterator,
+ typename thrust::host_vector<T>::iterator>
+ h_end;
- thrust::pair<
- typename thrust::device_vector<T>::iterator,
- typename thrust::device_vector<T>::iterator
- > d_end;
+ thrust::pair<typename thrust::device_vector<T>::iterator,
+ typename thrust::device_vector<T>::iterator>
+ d_end;
- h_end = thrust::set_intersection_by_key(h_a_key.begin(), h_a_key.end(),
- h_b_key.begin(), h_b_key.end(),
+ h_end = thrust::set_intersection_by_key(h_a_key.begin(),
+ h_a_key.end(),
+ h_b_key.begin(),
+ h_b_key.end(),
h_a_val.begin(),
h_result_key.begin(),
h_result_val.begin(),
@@ -106,8 +115,10 @@ TYPED_TEST(SetIntersectionByKeyDescendingPrimitiveTests, TestSetIntersectionByKe
h_result_key.erase(h_end.first, h_result_key.end());
h_result_val.erase(h_end.second, h_result_val.end());
- d_end = thrust::set_intersection_by_key(d_a_key.begin(), d_a_key.end(),
- d_b_key.begin(), d_b_key.end(),
+ d_end = thrust::set_intersection_by_key(d_a_key.begin(),
+ d_a_key.end(),
+ d_b_key.begin(),
+ d_b_key.end(),
d_a_val.begin(),
d_result_key.begin(),
d_result_val.begin(),

clang-format prev commit