Skip to content

Commit d97b5df

Browse files
committed
Merge remote-tracking branch 'origin/main' into cuda_reduce
2 parents 6dce716 + c2ebe84 commit d97b5df

11 files changed

+98
-27
lines changed

include/nvexec/stream/bulk.cuh

+12
Original file line numberDiff line numberDiff line change
@@ -371,3 +371,15 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
371371
};
372372
};
373373
}
374+
375+
namespace stdexec::__detail {
376+
template <class SenderId, class Shape, class Fun>
377+
inline constexpr __mconst<
378+
nvexec::STDEXEC_STREAM_DETAIL_NS::bulk_sender_t<__name_of<__t<SenderId>>, Shape, Fun>>
379+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::bulk_sender_t<SenderId, Shape, Fun>>{};
380+
381+
template <class SenderId, class Shape, class Fun>
382+
inline constexpr __mconst<
383+
nvexec::STDEXEC_STREAM_DETAIL_NS::multi_gpu_bulk_sender_t<__name_of<__t<SenderId>>, Shape, Fun>>
384+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::multi_gpu_bulk_sender_t<SenderId, Shape, Fun>>{};
385+
}

include/nvexec/stream/ensure_started.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -359,3 +359,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
359359
};
360360
};
361361
}
362+
363+
namespace stdexec::__detail {
364+
template <class SenderId>
365+
inline constexpr __mconst<
366+
nvexec::STDEXEC_STREAM_DETAIL_NS::ensure_started_sender_t<__name_of<__t<SenderId>>>>
367+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::ensure_started_sender_t<SenderId>>{};
368+
}

include/nvexec/stream/launch.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,10 @@ namespace nvexec {
179179
inline constexpr STDEXEC_STREAM_DETAIL_NS::launch_t launch{};
180180

181181
} // namespace nvexec
182+
183+
namespace stdexec::__detail {
184+
template <class SenderId, class Fun>
185+
inline constexpr __mconst<
186+
nvexec::STDEXEC_STREAM_DETAIL_NS::launch_sender_t<__name_of<__t<SenderId>>, Fun>>
187+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::launch_sender_t<SenderId, Fun>>{};
188+
}

include/nvexec/stream/let_xxx.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
251251
};
252252
};
253253
}
254+
255+
namespace stdexec::__detail {
256+
template <class SenderId, class Fun, class Set>
257+
inline constexpr __mconst<
258+
nvexec::STDEXEC_STREAM_DETAIL_NS::let_sender_t<__name_of<__t<SenderId>>, Fun, Set>>
259+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::let_sender_t<SenderId, Fun, Set>>{};
260+
}

include/nvexec/stream/split.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
342342
};
343343
};
344344
}
345+
346+
namespace stdexec::__detail {
347+
template <class SenderId>
348+
extern __mconst<
349+
nvexec::STDEXEC_STREAM_DETAIL_NS::split_sender_t<__name_of<__t<SenderId>>>>
350+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::split_sender_t<SenderId>>;
351+
}

include/nvexec/stream/then.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
195195
};
196196
};
197197
}
198+
199+
namespace stdexec::__detail {
200+
template <class SenderId, class Fun>
201+
inline constexpr __mconst<
202+
nvexec::STDEXEC_STREAM_DETAIL_NS::then_sender_t<__name_of<__t<SenderId>>, Fun>>
203+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::then_sender_t<SenderId, Fun>>{};
204+
}

include/nvexec/stream/upon_error.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
178178
};
179179
};
180180
}
181+
182+
namespace stdexec::__detail {
183+
template <class SenderId, class Fun>
184+
inline constexpr __mconst<
185+
nvexec::STDEXEC_STREAM_DETAIL_NS::upon_error_sender_t<__name_of<__t<SenderId>>, Fun>>
186+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::upon_error_sender_t<SenderId, Fun>>{};
187+
}

include/nvexec/stream/upon_stopped.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
153153
};
154154
};
155155
}
156+
157+
namespace stdexec::__detail {
158+
template <class SenderId, class Fun>
159+
inline constexpr __mconst<
160+
nvexec::STDEXEC_STREAM_DETAIL_NS::upon_stopped_sender_t<__name_of<__t<SenderId>>, Fun>>
161+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::upon_stopped_sender_t<SenderId, Fun>>{};
162+
}

include/nvexec/stream/when_all.cuh

+7
Original file line numberDiff line numberDiff line change
@@ -415,3 +415,10 @@ namespace nvexec::STDEXEC_STREAM_DETAIL_NS {
415415
};
416416
};
417417
}
418+
419+
namespace stdexec::__detail {
420+
template <bool WithCompletionScheduler, class Scheduler, class... SenderIds>
421+
inline constexpr __mconst<
422+
nvexec::STDEXEC_STREAM_DETAIL_NS::when_all_sender_t<WithCompletionScheduler, Scheduler, __name_of<__t<SenderIds>>...>>
423+
__name_of_v<nvexec::STDEXEC_STREAM_DETAIL_NS::when_all_sender_t<WithCompletionScheduler, Scheduler, SenderIds...>>{};
424+
}

include/stdexec/execution.hpp

+26-23
Original file line numberDiff line numberDiff line change
@@ -2704,36 +2704,40 @@ namespace stdexec {
27042704
}
27052705
};
27062706

2707-
inline constexpr struct __just_t : __just_impl<__just_t, set_value_t> {
2707+
struct just_t : __just_impl<just_t, set_value_t> {
27082708
template <__movable_value... _Ts>
27092709
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
27102710
auto
27112711
operator()(_Ts&&... __ts) const noexcept((__nothrow_decay_copyable<_Ts> && ...)) {
2712-
return make_sender_expr<__just_t>(__decayed_tuple<_Ts...>{(_Ts&&) __ts...});
2712+
return make_sender_expr<just_t>(__decayed_tuple<_Ts...>{(_Ts&&) __ts...});
27132713
}
2714-
} just{};
2714+
};
27152715

2716-
inline constexpr struct __just_error_t : __just_impl<__just_error_t, set_error_t> {
2716+
struct just_error_t : __just_impl<just_error_t, set_error_t> {
27172717
template <__movable_value _Error>
27182718
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
27192719
auto
27202720
operator()(_Error&& __err) const noexcept(__nothrow_decay_copyable<_Error>) {
2721-
return make_sender_expr<__just_error_t>(__decayed_tuple<_Error>{(_Error&&) __err});
2721+
return make_sender_expr<just_error_t>(__decayed_tuple<_Error>{(_Error&&) __err});
27222722
}
2723-
} just_error{};
2723+
};
27242724

2725-
inline constexpr struct __just_stopped_t : __just_impl<__just_stopped_t, set_stopped_t> {
2725+
struct just_stopped_t : __just_impl<just_stopped_t, set_stopped_t> {
27262726
STDEXEC_DETAIL_CUDACC_HOST_DEVICE //
27272727
auto
27282728
operator()() const noexcept {
2729-
return make_sender_expr<__just_stopped_t>(__decayed_tuple<>());
2729+
return make_sender_expr<just_stopped_t>(__decayed_tuple<>());
27302730
}
2731-
} just_stopped{};
2731+
};
27322732
}
27332733

2734-
using __just::just;
2735-
using __just::just_error;
2736-
using __just::just_stopped;
2734+
using __just::just_t;
2735+
using __just::just_error_t;
2736+
using __just::just_stopped_t;
2737+
2738+
inline constexpr just_t just {};
2739+
inline constexpr just_error_t just_error {};
2740+
inline constexpr just_stopped_t just_stopped {};
27372741

27382742
/////////////////////////////////////////////////////////////////////////////
27392743
// [execution.execute]
@@ -3303,7 +3307,7 @@ namespace stdexec {
33033307
#endif
33043308

33053309
template <sender_expr_for<then_t> _Sender, class _Env>
3306-
static auto get_completion_signatures(_Sender&& __sndr, _Env&&)
3310+
static auto get_completion_signatures(_Sender&&, _Env&&)
33073311
-> __completion_signatures_t<__decay_t<__data_of<_Sender>>, __child_of<_Sender>, _Env> {
33083312
return {};
33093313
}
@@ -3444,7 +3448,7 @@ namespace stdexec {
34443448
#endif
34453449

34463450
template <sender_expr_for<upon_error_t> _Sender, class _Env>
3447-
static auto get_completion_signatures(_Sender&& __sndr, _Env&&)
3451+
static auto get_completion_signatures(_Sender&&, _Env&&)
34483452
-> __completion_signatures_t<__decay_t<__data_of<_Sender>>, __child_of<_Sender>, _Env> {
34493453
return {};
34503454
}
@@ -3588,7 +3592,7 @@ namespace stdexec {
35883592
#endif
35893593

35903594
template <sender_expr_for<upon_stopped_t> _Sender, class _Env>
3591-
static auto get_completion_signatures(_Sender&& __sndr, _Env&&)
3595+
static auto get_completion_signatures(_Sender&&, _Env&&)
35923596
-> __completion_signatures_t<__decay_t<__data_of<_Sender>>, __child_of<_Sender>, _Env> {
35933597
return {};
35943598
}
@@ -3795,7 +3799,7 @@ namespace stdexec {
37953799
using __shape_t = decltype(__decay_t<__data_of<_Sender>>::__shape_);
37963800

37973801
template <sender_expr_for<bulk_t> _Sender, class _Env>
3798-
static auto get_completion_signatures(_Sender&& __sndr, _Env&&)
3802+
static auto get_completion_signatures(_Sender&&, _Env&&)
37993803
-> __completion_signatures<__child_of<_Sender>, _Env, __shape_t<_Sender>, __fun_t<_Sender>> {
38003804
return {};
38013805
}
@@ -4070,7 +4074,7 @@ namespace stdexec {
40704074
}
40714075

40724076
template <sender_expr_for<__split_t> _Self, class _OtherEnv>
4073-
static auto get_completion_signatures(_Self&& __self, _OtherEnv&&)
4077+
static auto get_completion_signatures(_Self&&, _OtherEnv&&)
40744078
-> __call_result_t<apply_sender_t, _Self, __mtypeof<__get_completion_signatures_fn>> {
40754079
return {};
40764080
}
@@ -4407,7 +4411,7 @@ namespace stdexec {
44074411
}
44084412

44094413
template <sender_expr_for<__ensure_started_t> _Self, class _OtherEnv>
4410-
static auto get_completion_signatures(_Self&& __self, _OtherEnv&&)
4414+
static auto get_completion_signatures(_Self&&, _OtherEnv&&)
44114415
-> __call_result_t<apply_sender_t, _Self, __mtypeof<__get_completion_signatures_fn>> {
44124416
return {};
44134417
}
@@ -4722,7 +4726,7 @@ namespace stdexec {
47224726

47234727
template <class _Receiver2>
47244728
__t(_Sender&& __sndr, _Receiver2&& __rcvr, _Fun __fun)
4725-
: __op_base_t{{{}, (_Receiver2&&) __rcvr, query_or(get_completion_scheduler<_Set>, get_env(__sndr), __none_such())}, (_Fun&&) __fun}
4729+
: __op_base_t{{{}, (_Receiver2&&) __rcvr, query_or(get_completion_scheduler<_Set>, get_env(__sndr), __none_such())}, (_Fun&&) __fun, {}, {}}
47264730
, __op_state2_(connect((_Sender&&) __sndr, __receiver_t{this})) {
47274731
}
47284732

@@ -5487,7 +5491,7 @@ namespace stdexec {
54875491
}
54885492

54895493
template <sender_expr_for<schedule_from_t> _Sender, class _Env>
5490-
static auto get_completion_signatures(_Sender&& __sndr, const _Env&) noexcept
5494+
static auto get_completion_signatures(_Sender&&, const _Env&) noexcept
54915495
-> __completions_t<__scheduler_t<_Sender>, __child_of<_Sender>, _Env> {
54925496
return {};
54935497
}
@@ -6430,7 +6434,7 @@ namespace stdexec {
64306434
__children_of<_Self, __mbind_front_q<__completions_t, __env_t<_Env>>>;
64316435

64326436
template <sender_expr_for<when_all_t> _Self, class _Env>
6433-
static auto get_completion_signatures(_Self&& __self, _Env&&) {
6437+
static auto get_completion_signatures(_Self&&, _Env&&) {
64346438
return __minvoke<__mtry_catch<__q<__completions>, __q<__error>>, _Self, _Env>();
64356439
}
64366440

@@ -6825,12 +6829,11 @@ namespace stdexec {
68256829
(_Sender&&) __sndr,
68266830
[&]<class _Data, class _Child>(__ignore, _Data&& __data, _Child&& __child) {
68276831
auto&& [__sched, __clsur] = (_Data&&) __data;
6828-
using _Scheduler = decltype(__sched);
68296832
using _Closure = decltype(__clsur);
68306833
return __write(
68316834
transfer(
68326835
((_Closure&&) __clsur)(
6833-
transfer(__write((_Child&&) __child, __mkenv(__old)), (_Scheduler&&) __sched)),
6836+
transfer(__write((_Child&&) __child, __mkenv(__old)), __sched)),
68346837
__old),
68356838
__mkenv(__sched));
68366839
}),

test/exec/test_variant_sender.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ template <class... Ts>
3030
overloaded(Ts...) -> overloaded<Ts...>;
3131

3232
using just_int_t = decltype(just(0));
33-
using just_t = decltype(just());
33+
using just_void_t = decltype(just());
3434

3535
TEST_CASE("variant_sender - default constructible", "[types][variant_sender]") {
36-
variant_sender<just_t, just_int_t> variant{just()};
36+
variant_sender<just_void_t, just_int_t> variant{just()};
3737
CHECK(variant.index() == 0);
3838
}
3939

4040
TEST_CASE("variant_sender - using an overloaded then adaptor", "[types][variant_sender]") {
41-
variant_sender<just_t, just_int_t> variant = just();
41+
variant_sender<just_void_t, just_int_t> variant = just();
4242
int index = -1;
43-
STATIC_REQUIRE(sender<variant_sender<just_t, just_int_t>>);
43+
STATIC_REQUIRE(sender<variant_sender<just_void_t, just_int_t>>);
4444
sync_wait(variant | then([&index](auto... xs) { index = sizeof...(xs); }));
4545
CHECK(index == 0);
4646

0 commit comments

Comments
 (0)