@@ -30,10 +30,10 @@ using namespace cuda::experimental::stf;
3030// Functor to apply the transformation
3131struct my_transform_functor
3232{
33- __host__ __device__ int operator ()(const thrust ::tuple<int , char >& t) const
33+ __host__ __device__ int operator ()(const cuda::std ::tuple<int , char >& t) const
3434 {
35- int a = thrust ::get<0 >(t);
36- char b = thrust ::get<1 >(t);
35+ int a = cuda::std ::get<0 >(t);
36+ char b = cuda::std ::get<1 >(t);
3737 return a + static_cast <int >(b); // Example operation
3838 }
3939};
@@ -50,10 +50,10 @@ void thrust_algorithm(context& ctx, ZippedIt& first, ZippedIt& last, OutIt& outp
5050 size_t num_elements = cuda::std::distance (first, last);
5151
5252 // Extract underlying iterators from the zip iterator
53- auto itA = thrust ::get<0 >(first.get_iterator_tuple ());
53+ auto itA = cuda::std ::get<0 >(first.get_iterator_tuple ());
5454 int * A = thrust::raw_pointer_cast (&(*itA));
5555
56- auto itB = thrust ::get<1 >(first.get_iterator_tuple ());
56+ auto itB = cuda::std ::get<1 >(first.get_iterator_tuple ());
5757 char * B = thrust::raw_pointer_cast (&(*itB));
5858
5959 int * C = thrust::raw_pointer_cast (output.data ());
@@ -66,7 +66,7 @@ void thrust_algorithm(context& ctx, ZippedIt& first, ZippedIt& last, OutIt& outp
6666 ctx.task (lA.read (), lB.read (), lC.write ())->*[](cudaStream_t stream, auto dA, auto dB, auto dC) {
6767 // Reconstruct a zipped iterator from the data instances passed to the lambda function
6868 size_t num_elements = dA.size ();
69- auto dfirst = thrust::make_zip_iterator (thrust::make_tuple (dA.data_handle (), dB.data_handle ()));
69+ auto dfirst = thrust::make_zip_iterator (cuda::std::tuple (dA.data_handle (), dB.data_handle ()));
7070 auto dlast = dfirst + num_elements;
7171
7272 // Create a device pointer from the raw pointer
@@ -94,8 +94,8 @@ int main()
9494 B[1 ] = ' y' ;
9595 B[2 ] = ' z' ;
9696
97- auto first = thrust::make_zip_iterator (thrust::make_tuple (A.begin (), B.begin ()));
98- auto last = thrust::make_zip_iterator (thrust::make_tuple (A.end (), B.end ()));
97+ auto first = thrust::make_zip_iterator (cuda::std::tuple (A.begin (), B.begin ()));
98+ auto last = thrust::make_zip_iterator (cuda::std::tuple (A.end (), B.end ()));
9999
100100 thrust_algorithm (ctx, first, last, C, data_place::current_device ());
101101
@@ -114,8 +114,8 @@ int main()
114114 hB[1 ] = ' y' ;
115115 hB[2 ] = ' z' ;
116116
117- auto hfirst = thrust::make_zip_iterator (thrust::make_tuple (hA.begin (), hB.begin ()));
118- auto hlast = thrust::make_zip_iterator (thrust::make_tuple (hA.end (), hB.end ()));
117+ auto hfirst = thrust::make_zip_iterator (cuda::std::tuple (hA.begin (), hB.begin ()));
118+ auto hlast = thrust::make_zip_iterator (cuda::std::tuple (hA.end (), hB.end ()));
119119
120120 thrust_algorithm (ctx, hfirst, hlast, hC, data_place::host ());
121121
0 commit comments