Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around CUDA 12.4 compilation issues in when_all_vector.hpp and algorithm_test_utils.hpp #1084

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,13 @@ namespace pika::when_all_vector_detail {
{
op_states[i].emplace(pika::detail::with_result_of([&]() {
return pika::execution::experimental::connect(
PIKA_MOVE(sender), when_all_vector_receiver{*this, i});
#if defined(__NVCC__) && defined(PIKA_CUDA_VERSION) && (PIKA_CUDA_VERSION >= 1204)
std::move(sender)
#else
PIKA_MOVE(sender)
#endif
,
when_all_vector_receiver{*this, i});
}));
++i;
}
Expand Down Expand Up @@ -286,8 +292,15 @@ namespace pika::when_all_vector_detail {
for (auto&& t : ts)
{
PIKA_ASSERT(t.has_value());
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
values.push_back(PIKA_MOVE(*t));
values.push_back(
#if defined(__NVCC__) && defined(PIKA_CUDA_VERSION) && (PIKA_CUDA_VERSION >= 1204)
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
std::move(*t)
#else
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
PIKA_MOVE(*t)
#endif
);
}
pika::execution::experimental::set_value(
PIKA_MOVE(receiver), PIKA_MOVE(values));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ struct callback_receiver
};

template <typename... Ts>
friend auto tag_invoke(pika::execution::experimental::set_value_t, callback_receiver&& r,
Ts&&... ts) noexcept -> decltype(PIKA_INVOKE(f, std::forward<Ts>(ts)...), void())
friend auto tag_invoke(
pika::execution::experimental::set_value_t, callback_receiver&& r, Ts&&... ts) noexcept
-> decltype(PIKA_INVOKE(std::declval<std::decay_t<F>>(), std::forward<Ts>(ts)...), void())
{
PIKA_INVOKE(r.f, std::forward<Ts>(ts)...);
r.set_value_called = true;
Expand Down
Loading