Skip to content

Commit 80c4bf2

Browse files
bernhardmgruberdavebayer
authored andcommitted
Deprecate thrust::async (NVIDIA#3324)
Fixes: NVIDIA#100
1 parent 7f3e180 commit 80c4bf2

File tree

4 files changed

+28
-33
lines changed

4 files changed

+28
-33
lines changed

thrust/thrust/async/copy.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,15 @@ struct copy_fn final
9797
// Synthesize a suitable new execution policy, because we don't want to
9898
// try and extract twice from the one we were passed.
9999
,
100-
typename ::cuda::std::remove_cvref_t<
101-
decltype(thrust::detail::derived_cast(thrust::detail::strip_const(exec)))>::tag_type{},
100+
typename remove_cvref_t<decltype(thrust::detail::derived_cast(thrust::detail::strip_const(exec)))>::tag_type{},
102101
THRUST_FWD(first),
103102
THRUST_FWD(last),
104103
THRUST_FWD(output)))
105104

106105
template <typename ForwardIt, typename Sentinel, typename OutputIt>
107106
_CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, OutputIt&& output) THRUST_RETURNS(copy_fn::call(
108-
thrust::detail::select_system(
109-
typename thrust::iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{}),
110-
thrust::detail::select_system(typename thrust::iterator_system<::cuda::std::remove_cvref_t<OutputIt>>::type{}),
107+
thrust::detail::select_system(typename thrust::iterator_system<remove_cvref_t<ForwardIt>>::type{}),
108+
thrust::detail::select_system(typename thrust::iterator_system<remove_cvref_t<OutputIt>>::type{}),
111109
THRUST_FWD(first),
112110
THRUST_FWD(last),
113111
THRUST_FWD(output)))

thrust/thrust/async/for_each.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct for_each_fn final
8282

8383
template <typename ForwardIt, typename Sentinel, typename UnaryFunction>
8484
_CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, UnaryFunction&& f) THRUST_RETURNS(for_each_fn::call(
85-
thrust::detail::select_system(typename iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{}),
85+
thrust::detail::select_system(typename iterator_system<remove_cvref_t<ForwardIt>>::type{}),
8686
THRUST_FWD(first),
8787
THRUST_FWD(last),
8888
THRUST_FWD(f)))

thrust/thrust/async/reduce.h

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct reduce_fn final
9898
THRUST_FWD(first),
9999
THRUST_FWD(last),
100100
THRUST_FWD(init),
101-
thrust::plus<::cuda::std::remove_cvref_t<T>>{})) _CCCL_SUPPRESS_DEPRECATED_POP
101+
thrust::plus<remove_cvref_t<T>>{})) _CCCL_SUPPRESS_DEPRECATED_POP
102102

103103
template <typename DerivedPolicy, typename ForwardIt, typename Sentinel>
104104
_CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH
@@ -111,15 +111,14 @@ struct reduce_fn final
111111
thrust::detail::derived_cast(thrust::detail::strip_const(exec)),
112112
THRUST_FWD(first),
113113
THRUST_FWD(last),
114-
typename iterator_traits<::cuda::std::remove_cvref_t<ForwardIt>>::value_type{},
115-
thrust::plus<
116-
::cuda::std::remove_cvref_t<typename iterator_traits<::cuda::std::remove_cvref_t<ForwardIt>>::value_type>>{}))
114+
typename iterator_traits<remove_cvref_t<ForwardIt>>::value_type{},
115+
thrust::plus<remove_cvref_t<typename iterator_traits<remove_cvref_t<ForwardIt>>::value_type>>{}))
117116
_CCCL_SUPPRESS_DEPRECATED_POP
118117

119118
template <typename ForwardIt, typename Sentinel, typename T, typename BinaryOp>
120119
_CCCL_HOST static auto call4(ForwardIt&& first, Sentinel&& last, T&& init, BinaryOp&& op, thrust::false_type)
121120
THRUST_RETURNS(reduce_fn::call(
122-
thrust::detail::select_system(typename iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{}),
121+
thrust::detail::select_system(typename iterator_system<remove_cvref_t<ForwardIt>>::type{}),
123122
THRUST_FWD(first),
124123
THRUST_FWD(last),
125124
THRUST_FWD(init),
@@ -128,11 +127,11 @@ struct reduce_fn final
128127
template <typename ForwardIt, typename Sentinel, typename T>
129128
_CCCL_HOST static auto call3(ForwardIt&& first, Sentinel&& last, T&& init, thrust::false_type)
130129
THRUST_RETURNS(reduce_fn::call(
131-
thrust::detail::select_system(typename iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{}),
130+
thrust::detail::select_system(typename iterator_system<remove_cvref_t<ForwardIt>>::type{}),
132131
THRUST_FWD(first),
133132
THRUST_FWD(last),
134133
THRUST_FWD(init),
135-
thrust::plus<::cuda::std::remove_cvref_t<T>>{}))
134+
thrust::plus<remove_cvref_t<T>>{}))
136135

137136
// MSVC WAR: MSVC gets angsty and eats all available RAM when we try to detect
138137
// if T1 is an execution_policy by using SFINAE. Switching to a static
@@ -225,7 +224,7 @@ struct reduce_into_fn final
225224
THRUST_FWD(last),
226225
THRUST_FWD(output),
227226
THRUST_FWD(init),
228-
thrust::plus<::cuda::std::remove_cvref_t<T>>{})) _CCCL_SUPPRESS_DEPRECATED_POP
227+
thrust::plus<remove_cvref_t<T>>{})) _CCCL_SUPPRESS_DEPRECATED_POP
229228

230229
template <typename DerivedPolicy, typename ForwardIt, typename Sentinel, typename OutputIt>
231230
_CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH
@@ -240,17 +239,16 @@ struct reduce_into_fn final
240239
THRUST_FWD(first),
241240
THRUST_FWD(last),
242241
THRUST_FWD(output),
243-
typename iterator_traits<::cuda::std::remove_cvref_t<ForwardIt>>::value_type{},
244-
thrust::plus<
245-
::cuda::std::remove_cvref_t<typename iterator_traits<::cuda::std::remove_cvref_t<ForwardIt>>::value_type>>{}))
242+
typename iterator_traits<remove_cvref_t<ForwardIt>>::value_type{},
243+
thrust::plus<remove_cvref_t<typename iterator_traits<remove_cvref_t<ForwardIt>>::value_type>>{}))
246244
_CCCL_SUPPRESS_DEPRECATED_POP
247245

248246
template <typename ForwardIt, typename Sentinel, typename OutputIt, typename T, typename BinaryOp>
249247
_CCCL_HOST static auto call5(
250248
ForwardIt&& first, Sentinel&& last, OutputIt&& output, T&& init, BinaryOp&& op, thrust::false_type)
251249
THRUST_RETURNS(reduce_into_fn::call(
252-
thrust::detail::select_system(typename iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{},
253-
typename iterator_system<::cuda::std::remove_cvref_t<OutputIt>>::type{}),
250+
thrust::detail::select_system(typename iterator_system<remove_cvref_t<ForwardIt>>::type{},
251+
typename iterator_system<remove_cvref_t<OutputIt>>::type{}),
254252
THRUST_FWD(first),
255253
THRUST_FWD(last),
256254
THRUST_FWD(output),
@@ -260,25 +258,24 @@ struct reduce_into_fn final
260258
template <typename ForwardIt, typename Sentinel, typename OutputIt, typename T>
261259
_CCCL_HOST static auto call4(ForwardIt&& first, Sentinel&& last, OutputIt&& output, T&& init, thrust::false_type)
262260
THRUST_RETURNS(reduce_into_fn::call(
263-
thrust::detail::select_system(typename iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{},
264-
typename iterator_system<::cuda::std::remove_cvref_t<OutputIt>>::type{}),
261+
thrust::detail::select_system(typename iterator_system<remove_cvref_t<ForwardIt>>::type{},
262+
typename iterator_system<remove_cvref_t<OutputIt>>::type{}),
265263
THRUST_FWD(first),
266264
THRUST_FWD(last),
267265
THRUST_FWD(output),
268266
THRUST_FWD(init),
269-
thrust::plus<::cuda::std::remove_cvref_t<T>>{}))
267+
thrust::plus<remove_cvref_t<T>>{}))
270268

271269
template <typename ForwardIt, typename Sentinel, typename OutputIt>
272270
_CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, OutputIt&& output)
273271
THRUST_RETURNS(reduce_into_fn::call(
274-
thrust::detail::select_system(typename iterator_system<::cuda::std::remove_cvref_t<ForwardIt>>::type{},
275-
typename iterator_system<::cuda::std::remove_cvref_t<OutputIt>>::type{}),
272+
thrust::detail::select_system(typename iterator_system<remove_cvref_t<ForwardIt>>::type{},
273+
typename iterator_system<remove_cvref_t<OutputIt>>::type{}),
276274
THRUST_FWD(first),
277275
THRUST_FWD(last),
278276
THRUST_FWD(output),
279-
typename iterator_traits<::cuda::std::remove_cvref_t<ForwardIt>>::value_type{},
280-
thrust::plus<::cuda::std::remove_cvref_t<
281-
typename iterator_traits<::cuda::std::remove_cvref_t<ForwardIt>>::value_type>>{}))
277+
typename iterator_traits<remove_cvref_t<ForwardIt>>::value_type{},
278+
thrust::plus<remove_cvref_t<typename iterator_traits<remove_cvref_t<ForwardIt>>::value_type>>{}))
282279

283280
// MSVC WAR: MSVC gets angsty and eats all available RAM when we try to detect
284281
// if T1 is an execution_policy by using SFINAE. Switching to a static

thrust/thrust/async/scan.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ struct inclusive_scan_fn final
140140
typename Sentinel,
141141
typename OutputIt,
142142
typename BinaryOp,
143-
typename = std::enable_if_t<!is_execution_policy_v<::cuda::std::remove_cvref_t<ForwardIt>>>>
143+
typename = std::enable_if_t<!is_execution_policy_v<remove_cvref_t<ForwardIt>>>>
144144
CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH
145145
auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, BinaryOp&& op) const
146146
// ADL dispatch.
@@ -169,7 +169,7 @@ struct inclusive_scan_fn final
169169
typename OutputIt,
170170
typename InitialValueType,
171171
typename BinaryOp,
172-
typename = std::enable_if_t<!is_execution_policy_v<::cuda::std::remove_cvref_t<ForwardIt>>>>
172+
typename = std::enable_if_t<!is_execution_policy_v<remove_cvref_t<ForwardIt>>>>
173173
CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH
174174
auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init, BinaryOp&& op) const
175175
// ADL dispatch.
@@ -249,15 +249,15 @@ struct exclusive_scan_fn final
249249
THRUST_FWD(first),
250250
THRUST_FWD(last),
251251
THRUST_FWD(out),
252-
iterator_value_t<::cuda::std::remove_cvref_t<ForwardIt>>{},
252+
iterator_value_t<remove_cvref_t<ForwardIt>>{},
253253
thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP
254254

255255
template <typename ForwardIt,
256256
typename Sentinel,
257257
typename OutputIt,
258258
typename InitialValueType,
259259
typename BinaryOp,
260-
typename = std::enable_if_t<!is_execution_policy_v<::cuda::std::remove_cvref_t<ForwardIt>>>>
260+
typename = std::enable_if_t<!is_execution_policy_v<remove_cvref_t<ForwardIt>>>>
261261
CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH
262262
auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init, BinaryOp&& op) const
263263
// ADL dispatch.
@@ -274,7 +274,7 @@ struct exclusive_scan_fn final
274274
typename Sentinel,
275275
typename OutputIt,
276276
typename InitialValueType,
277-
typename = std::enable_if_t<!is_execution_policy_v<::cuda::std::remove_cvref_t<ForwardIt>>>>
277+
typename = std::enable_if_t<!is_execution_policy_v<remove_cvref_t<ForwardIt>>>>
278278
CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH
279279
auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init) const
280280
// ADL dispatch.
@@ -297,7 +297,7 @@ struct exclusive_scan_fn final
297297
THRUST_FWD(first),
298298
THRUST_FWD(last),
299299
THRUST_FWD(out),
300-
iterator_value_t<::cuda::std::remove_cvref_t<ForwardIt>>{},
300+
iterator_value_t<remove_cvref_t<ForwardIt>>{},
301301
thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP
302302
};
303303

0 commit comments

Comments
 (0)