Skip to content

Commit 97a3d2f

Browse files
Qualifiers
1 parent da2474f commit 97a3d2f

File tree

5 files changed

+26
-25
lines changed

5 files changed

+26
-25
lines changed

thrust/testing/tuple_reduce.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct TestTupleReduce
3838

3939
// zip up the data
4040
host_vector<tuple<T, T>> h_tuples(n);
41-
transform(h_t1.begin(), h_t1.end(), h_t2.begin(), h_tuples.begin(), MakeTupleFunctor());
41+
thrust::transform(h_t1.begin(), h_t1.end(), h_t2.begin(), h_tuples.begin(), MakeTupleFunctor());
4242

4343
// copy to device
4444
device_vector<tuple<T, T>> d_tuples = h_tuples;

thrust/testing/tuple_scan.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct TestTupleScan
4242

4343
// initialize input
4444
host_vector<tuple<T, T>> h_input(n);
45-
transform(h_t1.begin(), h_t1.end(), h_t2.begin(), h_input.begin(), MakeTupleFunctor());
45+
thrust::transform(h_t1.begin(), h_t1.end(), h_t2.begin(), h_input.begin(), MakeTupleFunctor());
4646
device_vector<tuple<T, T>> d_input = h_input;
4747

4848
// allocate output

thrust/testing/tuple_sort.cu

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,30 @@ struct TestTupleStableSort
3737

3838
// zip up the data
3939
host_vector<tuple<T, T>> h_tuples(n);
40-
transform(h_keys.begin(), h_keys.end(), h_values.begin(), h_tuples.begin(), MakeTupleFunctor());
40+
thrust::transform(h_keys.begin(), h_keys.end(), h_values.begin(), h_tuples.begin(), MakeTupleFunctor());
4141

4242
// copy to device
4343
device_vector<tuple<T, T>> d_tuples = h_tuples;
4444

4545
// sort on host
46-
stable_sort(h_tuples.begin(), h_tuples.end());
46+
thrust::stable_sort(h_tuples.begin(), h_tuples.end());
4747

4848
// sort on device
49-
stable_sort(d_tuples.begin(), d_tuples.end());
49+
thrust::stable_sort(d_tuples.begin(), d_tuples.end());
5050

51-
ASSERT_EQUAL(true, is_sorted(d_tuples.begin(), d_tuples.end()));
51+
ASSERT_EQUAL(true, thrust::is_sorted(d_tuples.begin(), d_tuples.end()));
5252

5353
// select keys
54-
transform(h_tuples.begin(), h_tuples.end(), h_keys.begin(), GetFunctor<0>());
54+
thrust::transform(h_tuples.begin(), h_tuples.end(), h_keys.begin(), GetFunctor<0>());
5555

5656
device_vector<T> d_keys(h_keys.size());
57-
transform(d_tuples.begin(), d_tuples.end(), d_keys.begin(), GetFunctor<0>());
57+
thrust::transform(d_tuples.begin(), d_tuples.end(), d_keys.begin(), GetFunctor<0>());
5858

5959
// select values
60-
transform(h_tuples.begin(), h_tuples.end(), h_values.begin(), GetFunctor<1>());
60+
thrust::transform(h_tuples.begin(), h_tuples.end(), h_values.begin(), GetFunctor<1>());
6161

6262
device_vector<T> d_values(h_values.size());
63-
transform(d_tuples.begin(), d_tuples.end(), d_values.begin(), GetFunctor<1>());
63+
thrust::transform(d_tuples.begin(), d_tuples.end(), d_values.begin(), GetFunctor<1>());
6464

6565
ASSERT_ALMOST_EQUAL(h_keys, d_keys);
6666
ASSERT_ALMOST_EQUAL(h_values, d_values);

thrust/testing/tuple_transform.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ struct TestTupleTransform
3636

3737
// zip up the data
3838
host_vector<tuple<T, T>> h_tuples(n);
39-
transform(h_t1.begin(), h_t1.end(), h_t2.begin(), h_tuples.begin(), MakeTupleFunctor());
39+
thrust::transform(h_t1.begin(), h_t1.end(), h_t2.begin(), h_tuples.begin(), MakeTupleFunctor());
4040

4141
// copy to device
4242
device_vector<tuple<T, T>> d_tuples = h_tuples;
4343

4444
device_vector<T> d_t1(n), d_t2(n);
4545

4646
// select 0th
47-
transform(d_tuples.begin(), d_tuples.end(), d_t1.begin(), GetFunctor<0>());
47+
thrust::transform(d_tuples.begin(), d_tuples.end(), d_t1.begin(), GetFunctor<0>());
4848

4949
// select 1st
50-
transform(d_tuples.begin(), d_tuples.end(), d_t2.begin(), GetFunctor<1>());
50+
thrust::transform(d_tuples.begin(), d_tuples.end(), d_t2.begin(), GetFunctor<1>());
5151

5252
ASSERT_ALMOST_EQUAL(h_t1, d_t1);
5353
ASSERT_ALMOST_EQUAL(h_t2, d_t2);

thrust/testing/zip_function.cu

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,20 @@ struct TestZipFunctionTransform
6060
device_vector<T> d_result_zip(n);
6161

6262
// Tuple base case
63-
transform(make_zip_iterator(h_data0.begin(), h_data1.begin(), h_data2.begin()),
64-
make_zip_iterator(h_data0.end(), h_data1.end(), h_data2.end()),
65-
h_result_tuple.begin(),
66-
SumThreeTuple{});
63+
64+
thrust::transform(make_zip_iterator(h_data0.begin(), h_data1.begin(), h_data2.begin()),
65+
make_zip_iterator(h_data0.end(), h_data1.end(), h_data2.end()),
66+
h_result_tuple.begin(),
67+
SumThreeTuple{});
6768
// Zip Function
68-
transform(make_zip_iterator(h_data0.begin(), h_data1.begin(), h_data2.begin()),
69-
make_zip_iterator(h_data0.end(), h_data1.end(), h_data2.end()),
70-
h_result_zip.begin(),
71-
make_zip_function(SumThree{}));
72-
transform(make_zip_iterator(d_data0.begin(), d_data1.begin(), d_data2.begin()),
73-
make_zip_iterator(d_data0.end(), d_data1.end(), d_data2.end()),
74-
d_result_zip.begin(),
75-
make_zip_function(SumThree{}));
69+
thrust::transform(make_zip_iterator(h_data0.begin(), h_data1.begin(), h_data2.begin()),
70+
make_zip_iterator(h_data0.end(), h_data1.end(), h_data2.end()),
71+
h_result_zip.begin(),
72+
make_zip_function(SumThree{}));
73+
thrust::transform(make_zip_iterator(d_data0.begin(), d_data1.begin(), d_data2.begin()),
74+
make_zip_iterator(d_data0.end(), d_data1.end(), d_data2.end()),
75+
d_result_zip.begin(),
76+
make_zip_function(SumThree{}));
7677

7778
ASSERT_EQUAL(h_result_tuple, h_result_zip);
7879
ASSERT_EQUAL(h_result_tuple, d_result_zip);

0 commit comments

Comments
 (0)