Skip to content

Commit a6dfb60

Browse files
lucteoericniebler
andauthored
Apply suggestions from code review
Co-authored-by: Eric Niebler <eniebler@boost.org>
1 parent 8e9547c commit a6dfb60

1 file changed

Lines changed: 17 additions & 30 deletions

File tree

include/stdexec/__detail/__bulk.hpp

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,6 @@ namespace stdexec {
192192
{}
193193
};
194194
}
195-
196-
// This describes how to use the pieces of a bulk sender to find
197-
// legacy customizations of the bulk algorithm.
198-
using _Sender = __1;
199-
using _Pol = __nth_member<0>(__0);
200-
using _Shape = __nth_member<1>(__0);
201-
using _Fun = __nth_member<2>(__0);
202-
using __legacy_customizations_t = __types<
203-
tag_invoke_t(
204-
_AlgoTag,
205-
get_completion_scheduler_t<set_value_t>(get_env_t(_Sender&)),
206-
_Sender,
207-
_Pol,
208-
_Shape,
209-
_Fun),
210-
tag_invoke_t(_AlgoTag, _Sender, _Pol, _Shape, _Fun)>;
211195
};
212196

213197
struct bulk_t : __generic_bulk_t<bulk_t> {
@@ -241,6 +225,23 @@ namespace stdexec {
241225
static auto transform_sender(_Sender&& __sndr, const _Env& __env) {
242226
return __sexpr_apply(static_cast<_Sender&&>(__sndr), __transform_sender_fn(__env));
243227
}
228+
using __generic_bulk_t<bulk_t>::operator();
229+
230+
template <sender _Sender, integral _Shape, copy_constructible _Fun>
231+
[[deprecated("The bulk algorithm now requires an execution policy such as stdexec::par as an argument.")]]
232+
STDEXEC_ATTRIBUTE((host, device)) auto operator()(_Sender&& __sndr, _Shape __shape, _Fun __fun) const {
233+
return (*this)(
234+
static_cast<_Sender&&>(__sndr),
235+
par,
236+
static_cast<_Shape&&>(__shape),
237+
static_cast<_Fun&&>(__fun));
238+
}
239+
240+
template <integral _Shape, copy_constructible _Fun>
241+
[[deprecated("The bulk algorithm now requires an execution policy such as stdexec::par as an argument.")]]
242+
STDEXEC_ATTRIBUTE((always_inline)) auto operator()(_Shape __shape, _Fun __fun) const {
243+
return (*this)(static_cast<_Shape&&>(__shape), static_cast<_Fun&&>(__fun));
244+
}
244245
};
245246

246247
struct bulk_chunked_t : __generic_bulk_t<bulk_chunked_t> { };
@@ -265,20 +266,6 @@ namespace stdexec {
265266
{}
266267
};
267268
}
268-
269-
// This describes how to use the pieces of a bulk sender to find
270-
// legacy customizations of the bulk algorithm.
271-
using _Sender = __1;
272-
using _Shape = __nth_member<1>(__0);
273-
using _Fun = __nth_member<2>(__0);
274-
using __legacy_customizations_t = __types<
275-
tag_invoke_t(
276-
bulk_unchunked_t,
277-
get_completion_scheduler_t<set_value_t>(get_env_t(_Sender&)),
278-
_Sender,
279-
_Shape,
280-
_Fun),
281-
tag_invoke_t(bulk_unchunked_t, _Sender, _Shape, _Fun)>;
282269
};
283270

284271
template <class _AlgoTag>

0 commit comments

Comments
 (0)