@@ -30,14 +30,14 @@ void TestRemoveSimple(void)
3030 typedef typename Vector::value_type T;
3131
3232 Vector data (5 );
33- data[0 ] = 1 ;
34- data[1 ] = 2 ;
33+ data[0 ] = 1 ;
34+ data[1 ] = 2 ;
3535 data[2 ] = 1 ;
36- data[3 ] = 3 ;
37- data[4 ] = 2 ;
36+ data[3 ] = 3 ;
37+ data[4 ] = 2 ;
3838
39- typename Vector::iterator end = thrust::remove (data.begin (),
40- data.end (),
39+ typename Vector::iterator end = thrust::remove (data.begin (),
40+ data.end (),
4141 (T) 2 );
4242
4343 ASSERT_EQUAL (end - data.begin (), 3 );
@@ -102,17 +102,17 @@ void TestRemoveCopySimple(void)
102102 typedef typename Vector::value_type T;
103103
104104 Vector data (5 );
105- data[0 ] = 1 ;
106- data[1 ] = 2 ;
105+ data[0 ] = 1 ;
106+ data[1 ] = 2 ;
107107 data[2 ] = 1 ;
108- data[3 ] = 3 ;
109- data[4 ] = 2 ;
108+ data[3 ] = 3 ;
109+ data[4 ] = 2 ;
110110
111111 Vector result (5 );
112112
113- typename Vector::iterator end = thrust::remove_copy (data.begin (),
114- data.end (),
115- result.begin (),
113+ typename Vector::iterator end = thrust::remove_copy (data.begin (),
114+ data.end (),
115+ result.begin (),
116116 (T) 2 );
117117
118118 ASSERT_EQUAL (end - result.begin (), 3 );
@@ -186,14 +186,14 @@ void TestRemoveIfSimple(void)
186186 typedef typename Vector::value_type T;
187187
188188 Vector data (5 );
189- data[0 ] = 1 ;
190- data[1 ] = 2 ;
189+ data[0 ] = 1 ;
190+ data[1 ] = 2 ;
191191 data[2 ] = 1 ;
192- data[3 ] = 3 ;
193- data[4 ] = 2 ;
192+ data[3 ] = 3 ;
193+ data[4 ] = 2 ;
194194
195- typename Vector::iterator end = thrust::remove_if (data.begin (),
196- data.end (),
195+ typename Vector::iterator end = thrust::remove_if (data.begin (),
196+ data.end (),
197197 is_even<T>());
198198
199199 ASSERT_EQUAL (end - data.begin (), 3 );
@@ -258,11 +258,11 @@ void TestRemoveIfStencilSimple(void)
258258 typedef typename Vector::value_type T;
259259
260260 Vector data (5 );
261- data[0 ] = 1 ;
262- data[1 ] = 2 ;
261+ data[0 ] = 1 ;
262+ data[1 ] = 2 ;
263263 data[2 ] = 1 ;
264- data[3 ] = 3 ;
265- data[4 ] = 2 ;
264+ data[3 ] = 3 ;
265+ data[4 ] = 2 ;
266266
267267 Vector stencil (5 );
268268 stencil[0 ] = 0 ;
@@ -271,7 +271,7 @@ void TestRemoveIfStencilSimple(void)
271271 stencil[3 ] = 0 ;
272272 stencil[4 ] = 1 ;
273273
274- typename Vector::iterator end = thrust::remove_if (data.begin (),
274+ typename Vector::iterator end = thrust::remove_if (data.begin (),
275275 data.end (),
276276 stencil.begin (),
277277 thrust::identity<T>());
@@ -347,17 +347,17 @@ void TestRemoveCopyIfSimple(void)
347347 typedef typename Vector::value_type T;
348348
349349 Vector data (5 );
350- data[0 ] = 1 ;
351- data[1 ] = 2 ;
350+ data[0 ] = 1 ;
351+ data[1 ] = 2 ;
352352 data[2 ] = 1 ;
353- data[3 ] = 3 ;
354- data[4 ] = 2 ;
353+ data[3 ] = 3 ;
354+ data[4 ] = 2 ;
355355
356356 Vector result (5 );
357357
358- typename Vector::iterator end = thrust::remove_copy_if (data.begin (),
359- data.end (),
360- result.begin (),
358+ typename Vector::iterator end = thrust::remove_copy_if (data.begin (),
359+ data.end (),
360+ result.begin (),
361361 is_even<T>());
362362
363363 ASSERT_EQUAL (end - result.begin (), 3 );
@@ -431,11 +431,11 @@ void TestRemoveCopyIfStencilSimple(void)
431431 typedef typename Vector::value_type T;
432432
433433 Vector data (5 );
434- data[0 ] = 1 ;
435- data[1 ] = 2 ;
434+ data[0 ] = 1 ;
435+ data[1 ] = 2 ;
436436 data[2 ] = 1 ;
437- data[3 ] = 3 ;
438- data[4 ] = 2 ;
437+ data[3 ] = 3 ;
438+ data[4 ] = 2 ;
439439
440440 Vector stencil (5 );
441441 stencil[0 ] = 0 ;
@@ -446,10 +446,10 @@ void TestRemoveCopyIfStencilSimple(void)
446446
447447 Vector result (5 );
448448
449- typename Vector::iterator end = thrust::remove_copy_if (data.begin (),
450- data.end (),
449+ typename Vector::iterator end = thrust::remove_copy_if (data.begin (),
450+ data.end (),
451451 stencil.begin (),
452- result.begin (),
452+ result.begin (),
453453 thrust::identity<T>());
454454
455455 ASSERT_EQUAL (end - result.begin (), 3 );
@@ -531,7 +531,7 @@ void TestRemove(const size_t n)
531531
532532 size_t h_size = thrust::remove (h_data.begin (), h_data.end (), T (0 )) - h_data.begin ();
533533 size_t d_size = thrust::remove (d_data.begin (), d_data.end (), T (0 )) - d_data.begin ();
534-
534+
535535 ASSERT_EQUAL (h_size, d_size);
536536
537537 h_data.resize (h_size);
@@ -550,7 +550,7 @@ void TestRemoveIf(const size_t n)
550550
551551 size_t h_size = thrust::remove_if (h_data.begin (), h_data.end (), is_true<T>()) - h_data.begin ();
552552 size_t d_size = thrust::remove_if (d_data.begin (), d_data.end (), is_true<T>()) - d_data.begin ();
553-
553+
554554 ASSERT_EQUAL (h_size, d_size);
555555
556556 h_data.resize (h_size);
@@ -569,10 +569,10 @@ void TestRemoveIfStencil(const size_t n)
569569
570570 thrust::host_vector<bool > h_stencil = unittest::random_integers<bool >(n);
571571 thrust::device_vector<bool > d_stencil = h_stencil;
572-
572+
573573 size_t h_size = thrust::remove_if (h_data.begin (), h_data.end (), h_stencil.begin (), is_true<T>()) - h_data.begin ();
574574 size_t d_size = thrust::remove_if (d_data.begin (), d_data.end (), d_stencil.begin (), is_true<T>()) - d_data.begin ();
575-
575+
576576 ASSERT_EQUAL (h_size, d_size);
577577
578578 h_data.resize (h_size);
@@ -588,13 +588,13 @@ void TestRemoveCopy(const size_t n)
588588{
589589 thrust::host_vector<T> h_data = unittest::random_samples<T>(n);
590590 thrust::device_vector<T> d_data = h_data;
591-
591+
592592 thrust::host_vector<T> h_result (n);
593593 thrust::device_vector<T> d_result (n);
594594
595595 size_t h_size = thrust::remove_copy (h_data.begin (), h_data.end (), h_result.begin (), T (0 )) - h_result.begin ();
596596 size_t d_size = thrust::remove_copy (d_data.begin (), d_data.end (), d_result.begin (), T (0 )) - d_result.begin ();
597-
597+
598598 ASSERT_EQUAL (h_size, d_size);
599599
600600 h_result.resize (h_size);
@@ -621,7 +621,7 @@ void TestRemoveCopyToDiscardIterator(const size_t n)
621621 thrust::remove_copy (d_data.begin (), d_data.end (), thrust::make_discard_iterator (), T (0 ));
622622
623623 thrust::discard_iterator<> reference (num_nonzeros);
624-
624+
625625 ASSERT_EQUAL_QUIET (reference, h_result);
626626 ASSERT_EQUAL_QUIET (reference, d_result);
627627}
@@ -659,7 +659,7 @@ void TestRemoveCopyToDiscardIteratorZipped(const size_t n)
659659 thrust::make_tuple (T (0 ),T (0 )));
660660
661661 thrust::discard_iterator<> reference (num_nonzeros);
662-
662+
663663 ASSERT_EQUAL (h_output, d_output);
664664 ASSERT_EQUAL_QUIET (reference, thrust::get<1 >(h_result.get_iterator_tuple ()));
665665 ASSERT_EQUAL_QUIET (reference, thrust::get<1 >(d_result.get_iterator_tuple ()));
@@ -675,10 +675,10 @@ void TestRemoveCopyIf(const size_t n)
675675
676676 thrust::host_vector<T> h_result (n);
677677 thrust::device_vector<T> d_result (n);
678-
678+
679679 size_t h_size = thrust::remove_copy_if (h_data.begin (), h_data.end (), h_result.begin (), is_true<T>()) - h_result.begin ();
680680 size_t d_size = thrust::remove_copy_if (d_data.begin (), d_data.end (), d_result.begin (), is_true<T>()) - d_result.begin ();
681-
681+
682682 ASSERT_EQUAL (h_size, d_size);
683683
684684 h_result.resize (h_size);
@@ -716,16 +716,16 @@ void TestRemoveCopyIfStencil(const size_t n)
716716{
717717 thrust::host_vector<T> h_data = unittest::random_samples<T>(n);
718718 thrust::device_vector<T> d_data = h_data;
719-
719+
720720 thrust::host_vector<bool > h_stencil = unittest::random_integers<bool >(n);
721721 thrust::device_vector<bool > d_stencil = h_stencil;
722-
722+
723723 thrust::host_vector<T> h_result (n);
724724 thrust::device_vector<T> d_result (n);
725725
726726 size_t h_size = thrust::remove_copy_if (h_data.begin (), h_data.end (), h_stencil.begin (), h_result.begin (), is_true<T>()) - h_result.begin ();
727727 size_t d_size = thrust::remove_copy_if (d_data.begin (), d_data.end (), d_stencil.begin (), d_result.begin (), is_true<T>()) - d_result.begin ();
728-
728+
729729 ASSERT_EQUAL (h_size, d_size);
730730
731731 h_result.resize (h_size);
@@ -741,7 +741,7 @@ void TestRemoveCopyIfStencilToDiscardIterator(const size_t n)
741741{
742742 thrust::host_vector<T> h_data = unittest::random_samples<T>(n);
743743 thrust::device_vector<T> d_data = h_data;
744-
744+
745745 thrust::host_vector<bool > h_stencil = unittest::random_integers<bool >(n);
746746 thrust::device_vector<bool > d_stencil = h_stencil;
747747
@@ -759,4 +759,3 @@ void TestRemoveCopyIfStencilToDiscardIterator(const size_t n)
759759 ASSERT_EQUAL_QUIET (reference, d_result);
760760}
761761DECLARE_VARIABLE_UNITTEST (TestRemoveCopyIfStencilToDiscardIterator);
762-
0 commit comments