|
267 | 267 | // thrust_make_zip_iterator-NEXT: typedef dpct::device_vector<float>::iterator float_iterator;
|
268 | 268 | // thrust_make_zip_iterator-NEXT: typedef std::tuple<int_iterator, float_iterator> iterator_tuple;
|
269 | 269 | // thrust_make_zip_iterator-NEXT: dpct::zip_iterator<iterator_tuple> ret = oneapi::dpl::make_zip_iterator(std::make_tuple(int_in.begin(), float_in.begin()));
|
| 270 | + |
| 271 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=thrust::count --extra-arg="-std=c++14"| FileCheck %s -check-prefix=thrust_count |
| 272 | +// thrust_count: CUDA API: |
| 273 | +// thrust_count-NEXT: std::vector<int> v; |
| 274 | +// thrust_count-NEXT: /*1*/ thrust::count(thrust::seq, v.begin(), v.end(), 23); |
| 275 | +// thrust_count-NEXT: /*2*/ thrust::count(v.begin(), v.end(), 23); |
| 276 | +// thrust_count-NEXT: Is migrated to: |
| 277 | +// thrust_count-NEXT: std::vector<int> v; |
| 278 | +// thrust_count-NEXT: /*1*/ std::count(oneapi::dpl::execution::seq, v.begin(), v.end(), 23); |
| 279 | +// thrust_count-NEXT: /*2*/ std::count(oneapi::dpl::execution::seq, v.begin(), v.end(), 23); |
| 280 | + |
| 281 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=thrust::sort --extra-arg="-std=c++14"| FileCheck %s -check-prefix=thrust_sort |
| 282 | +// thrust_sort: CUDA API: |
| 283 | +// thrust_sort-NEXT: thrust::host_vector<int> h_vec(10); |
| 284 | +// thrust_sort-NEXT: thrust::device_vector<int> d_vec(10); |
| 285 | +// thrust_sort-NEXT: /*1*/ thrust::sort(h_vec.begin(), h_vec.end()); |
| 286 | +// thrust_sort-NEXT: /*2*/ thrust::sort(thrust::device, d_vec.begin(), d_vec.end()); |
| 287 | +// thrust_sort-NEXT: Is migrated to: |
| 288 | +// thrust_sort-NEXT: std::vector<int> h_vec(10); |
| 289 | +// thrust_sort-NEXT: dpct::device_vector<int> d_vec(10); |
| 290 | +// thrust_sort-NEXT: /*1*/ oneapi::dpl::sort(oneapi::dpl::execution::seq, h_vec.begin(), h_vec.end()); |
| 291 | +// thrust_sort-NEXT: /*2*/ oneapi::dpl::sort(oneapi::dpl::execution::make_device_policy(q_ct1), d_vec.begin(), d_vec.end()); |
| 292 | + |
| 293 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=thrust::get_temporary_buffer --extra-arg="-std=c++14"| FileCheck %s -check-prefix=thrust_get_temporary_buffer |
| 294 | +// thrust_get_temporary_buffer: CUDA API: |
| 295 | +// thrust_get_temporary_buffer-NEXT: const int N = 100; |
| 296 | +// thrust_get_temporary_buffer-NEXT: typedef thrust::pair<thrust::pointer<int, thrust::device_system_tag>, std::ptrdiff_t> ptr_and_size_t; |
| 297 | +// thrust_get_temporary_buffer-NEXT: thrust::device_system_tag device_sys; |
| 298 | +// thrust_get_temporary_buffer-NEXT: ptr_and_size_t ptr_and_size = thrust::get_temporary_buffer<int>(device_sys, N); |
| 299 | +// thrust_get_temporary_buffer-NEXT: Is migrated to: |
| 300 | +// thrust_get_temporary_buffer-NEXT: const int N = 100; |
| 301 | +// thrust_get_temporary_buffer-NEXT: typedef std::pair<dpct::tagged_pointer<int, dpct::device_sys_tag>, std::ptrdiff_t> ptr_and_size_t; |
| 302 | +// thrust_get_temporary_buffer-NEXT: dpct::device_sys_tag device_sys; |
| 303 | +// thrust_get_temporary_buffer-NEXT: ptr_and_size_t ptr_and_size = dpct::get_temporary_allocation<int>(device_sys, N); |
| 304 | + |
| 305 | + |
0 commit comments