From ba3fda55c7472e064927e434016a95afce2f9450 Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Sat, 15 Aug 2026 13:21:41 +0200 Subject: [PATCH 1/2] Fix nvexec bulk callable forwarding --- include/nvexec/stream/bulk.cuh | 3 ++- test/nvexec/bulk.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/nvexec/stream/bulk.cuh b/include/nvexec/stream/bulk.cuh index a3a2a6ab8..bd25e995c 100644 --- a/include/nvexec/stream/bulk.cuh +++ b/include/nvexec/stream/bulk.cuh @@ -138,7 +138,8 @@ namespace nv::execution::_strm static_cast(rcvr), [&](_strm::opstate_base& stream_provider) -> receiver_t { - return receiver_t(self.shape_, static_cast(self.fun_), stream_provider); + return receiver_t( + self.shape_, static_cast(self).fun_, stream_provider); }); } STDEXEC_EXPLICIT_THIS_END(connect) diff --git a/test/nvexec/bulk.cpp b/test/nvexec/bulk.cpp index 1573cb94a..0a2378964 100644 --- a/test/nvexec/bulk.cpp +++ b/test/nvexec/bulk.cpp @@ -21,6 +21,15 @@ namespace (void) snd; } + TEST_CASE("nvexec bulk supports const lvalue senders", "[cuda][stream][adaptors][bulk]") + { + nvexec::stream_context stream_ctx{}; + auto const snd = ex::schedule(stream_ctx.get_scheduler()) + | ex::bulk(ex::par, 1, [](int) {}); + + REQUIRE(STDEXEC::sync_wait(snd).has_value()); + } + TEST_CASE("nvexec bulk executes on GPU", "[cuda][stream][adaptors][bulk]") { nvexec::stream_context stream_ctx{}; From e0c6df2970859d536df577a02d261d1132c13ade Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Sat, 15 Aug 2026 20:03:52 +0200 Subject: [PATCH 2/2] clang-format nvexec bulk changes --- include/nvexec/stream/bulk.cuh | 3 +-- test/nvexec/bulk.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/nvexec/stream/bulk.cuh b/include/nvexec/stream/bulk.cuh index bd25e995c..9a885cf86 100644 --- a/include/nvexec/stream/bulk.cuh +++ b/include/nvexec/stream/bulk.cuh @@ -138,8 +138,7 @@ namespace nv::execution::_strm static_cast(rcvr), [&](_strm::opstate_base& stream_provider) -> receiver_t { - return receiver_t( - self.shape_, static_cast(self).fun_, stream_provider); + return receiver_t(self.shape_, static_cast(self).fun_, stream_provider); }); } STDEXEC_EXPLICIT_THIS_END(connect) diff --git a/test/nvexec/bulk.cpp b/test/nvexec/bulk.cpp index 0a2378964..35f5992f5 100644 --- a/test/nvexec/bulk.cpp +++ b/test/nvexec/bulk.cpp @@ -24,8 +24,7 @@ namespace TEST_CASE("nvexec bulk supports const lvalue senders", "[cuda][stream][adaptors][bulk]") { nvexec::stream_context stream_ctx{}; - auto const snd = ex::schedule(stream_ctx.get_scheduler()) - | ex::bulk(ex::par, 1, [](int) {}); + auto const snd = ex::schedule(stream_ctx.get_scheduler()) | ex::bulk(ex::par, 1, [](int) {}); REQUIRE(STDEXEC::sync_wait(snd).has_value()); }