Skip to content

Commit aa71d81

Browse files
Backport to 2.8: Deprecate thrust::async (#3324) (#3388)
Fixes: #100
1 parent 21ff0a0 commit aa71d81

File tree

16 files changed

+332
-233
lines changed

16 files changed

+332
-233
lines changed

thrust/testing/async/exclusive_scan/mixin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ struct simple
9393
PostfixArgTuple&& postfix_tuple,
9494
std::index_sequence<PostfixArgIndices...>)
9595
{
96+
_CCCL_SUPPRESS_DEPRECATED_PUSH
9697
auto e = thrust::async::exclusive_scan(
9798
std::get<PrefixArgIndices>(THRUST_FWD(prefix_tuple))...,
9899
input.cbegin(),
99100
input.cend(),
100101
output.begin(),
101102
std::get<PostfixArgIndices>(THRUST_FWD(postfix_tuple))...);
103+
_CCCL_SUPPRESS_DEPRECATED_POP
102104
return e;
103105
}
104106
};

thrust/testing/async/exclusive_scan/using_vs_adl.cu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ struct using_namespace
6969
// Importing the CPO into the current namespace should unambiguously resolve
7070
// this call to the CPO, as opposed to resolving to the thrust:: algorithm
7171
// via ADL. This is verified by checking that an event is returned.
72+
_CCCL_SUPPRESS_DEPRECATED_PUSH
7273
using namespace thrust::async;
7374
thrust::device_event e = exclusive_scan(
7475
std::get<PrefixArgIndices>(THRUST_FWD(prefix_tuple))...,
7576
input.cbegin(),
7677
input.cend(),
7778
output.begin(),
7879
std::get<PostfixArgIndices>(THRUST_FWD(postfix_tuple))...);
80+
_CCCL_SUPPRESS_DEPRECATED_POP
7981
return e;
8082
}
8183
};
@@ -100,12 +102,14 @@ struct using_cpo
100102
// this call to the CPO, as opposed to resolving to the thrust:: algorithm
101103
// via ADL. This is verified by checking that an event is returned.
102104
using thrust::async::exclusive_scan;
105+
_CCCL_SUPPRESS_DEPRECATED_PUSH
103106
thrust::device_event e = exclusive_scan(
104107
std::get<PrefixArgIndices>(THRUST_FWD(prefix_tuple))...,
105108
input.cbegin(),
106109
input.cend(),
107110
output.begin(),
108111
std::get<PostfixArgIndices>(THRUST_FWD(postfix_tuple))...);
112+
_CCCL_SUPPRESS_DEPRECATED_POP
109113
return e;
110114
}
111115
};

thrust/testing/async/inclusive_scan/mixin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,14 @@ struct simple
109109
PostfixArgTuple&& postfix_tuple,
110110
std::index_sequence<PostfixArgIndices...>)
111111
{
112+
_CCCL_SUPPRESS_DEPRECATED_PUSH
112113
auto e = thrust::async::inclusive_scan(
113114
std::get<PrefixArgIndices>(THRUST_FWD(prefix_tuple))...,
114115
input.cbegin(),
115116
input.cend(),
116117
output.begin(),
117118
std::get<PostfixArgIndices>(THRUST_FWD(postfix_tuple))...);
119+
_CCCL_SUPPRESS_DEPRECATED_POP
118120
return e;
119121
}
120122
};

thrust/testing/async/inclusive_scan/using_vs_adl.cu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ struct using_namespace
6969
// Importing the CPO into the current namespace should unambiguously resolve
7070
// this call to the CPO, as opposed to resolving to the thrust:: algorithm
7171
// via ADL. This is verified by checking that an event is returned.
72+
_CCCL_SUPPRESS_DEPRECATED_PUSH
7273
using namespace thrust::async;
7374
thrust::device_event e = inclusive_scan(
7475
std::get<PrefixArgIndices>(THRUST_FWD(prefix_tuple))...,
7576
input.cbegin(),
7677
input.cend(),
7778
output.begin(),
7879
std::get<PostfixArgIndices>(THRUST_FWD(postfix_tuple))...);
80+
_CCCL_SUPPRESS_DEPRECATED_POP
7981
return e;
8082
}
8183
};
@@ -100,12 +102,14 @@ struct using_cpo
100102
// this call to the CPO, as opposed to resolving to the thrust:: algorithm
101103
// via ADL. This is verified by checking that an event is returned.
102104
using thrust::async::inclusive_scan;
105+
_CCCL_SUPPRESS_DEPRECATED_PUSH
103106
thrust::device_event e = inclusive_scan(
104107
std::get<PrefixArgIndices>(THRUST_FWD(prefix_tuple))...,
105108
input.cbegin(),
106109
input.cend(),
107110
output.begin(),
108111
std::get<PostfixArgIndices>(THRUST_FWD(postfix_tuple))...);
112+
_CCCL_SUPPRESS_DEPRECATED_POP
109113
return e;
110114
}
111115
};

thrust/testing/async_copy.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# include <unittest/unittest.h>
1111
# include <unittest/util_async.h>
1212

13+
_CCCL_SUPPRESS_DEPRECATED_PUSH
14+
1315
# define DEFINE_ASYNC_COPY_CALLABLE(name, ...) \
1416
struct THRUST_PP_CAT2(name, _fn) \
1517
{ \

thrust/testing/async_for_each.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
# include <unittest/unittest.h>
1010

11+
_CCCL_SUPPRESS_DEPRECATED_PUSH
12+
1113
# define DEFINE_ASYNC_FOR_EACH_CALLABLE(name, ...) \
1214
struct THRUST_PP_CAT2(name, _fn) \
1315
{ \
@@ -21,7 +23,6 @@
2123
/**/
2224

2325
DEFINE_ASYNC_FOR_EACH_CALLABLE(invoke_async_for_each);
24-
2526
DEFINE_ASYNC_FOR_EACH_CALLABLE(invoke_async_for_each_device, thrust::device);
2627

2728
# undef DEFINE_ASYNC_FOR_EACH_CALLABLE

thrust/testing/async_reduce.cu

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# include <unittest/unittest.h>
1313
# include <unittest/util_async.h>
1414

15+
_CCCL_SUPPRESS_DEPRECATED_PUSH
16+
1517
template <typename T>
1618
struct custom_plus
1719
{
@@ -539,12 +541,16 @@ struct test_async_reduce_using
539541
// When you import the customization points into the global namespace,
540542
// they should be selected instead of the synchronous algorithms.
541543
{
544+
_CCCL_SUPPRESS_DEPRECATED_PUSH
542545
using namespace thrust::async;
543546
f0a = reduce(d0a.begin(), d0a.end());
547+
_CCCL_SUPPRESS_DEPRECATED_POP
544548
}
545549
{
550+
_CCCL_SUPPRESS_DEPRECATED_PUSH
546551
using thrust::async::reduce;
547552
f0b = reduce(d0b.begin(), d0b.end());
553+
_CCCL_SUPPRESS_DEPRECATED_POP
548554
}
549555

550556
// ADL should find the synchronous algorithms.

thrust/testing/async_reduce_into.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# include <unittest/unittest.h>
1414
# include <unittest/util_async.h>
1515

16+
_CCCL_SUPPRESS_DEPRECATED_PUSH
17+
1618
template <typename T>
1719
struct custom_plus
1820
{

thrust/testing/async_sort.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
# include <unittest/unittest.h>
1717

18+
_CCCL_SUPPRESS_DEPRECATED_PUSH
19+
1820
enum wait_policy
1921
{
2022
wait_for_futures,

thrust/testing/async_transform.cu

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# include <unittest/unittest.h>
1111
# include <unittest/util_async.h>
1212

13+
_CCCL_SUPPRESS_DEPRECATED_PUSH
14+
1315
template <typename T>
1416
struct divide_by_2
1517
{
@@ -401,12 +403,16 @@ struct test_async_transform_using
401403
// When you import the customization points into the global namespace,
402404
// they should be selected instead of the synchronous algorithms.
403405
{
406+
_CCCL_SUPPRESS_DEPRECATED_PUSH
404407
using namespace thrust::async;
405408
f0a = transform(d0a.begin(), d0a.end(), d1a.begin(), op);
409+
_CCCL_SUPPRESS_DEPRECATED_POP
406410
}
407411
{
412+
_CCCL_SUPPRESS_DEPRECATED_PUSH
408413
using thrust::async::transform;
409414
f0b = transform(d0b.begin(), d0b.end(), d1b.begin(), op);
415+
_CCCL_SUPPRESS_DEPRECATED_POP
410416
}
411417

412418
// ADL should find the synchronous algorithms.

0 commit comments

Comments
 (0)