Skip to content

Commit

Permalink
Move type inference to auto declaration due to CUDA 12.4 compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
Linked-Liszt committed Dec 19, 2024
1 parent 7cc409e commit ba7216c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions source/PTL/TaskGroup.hh
Original file line number Diff line number Diff line change
Expand Up @@ -654,14 +654,16 @@ TaskGroup<Tp, Arg, MaxDepth>::join(Up accum)
{
this->wait();
for(auto& itr : m_task_list)
{
using RetT = decay_t<decltype(itr->get())>;
accum = std::move(m_join(std::ref(accum), std::forward<RetT>(itr->get())));
{
auto&& ret = itr->get();
using RetT = decay_t<decltype(ret)>;
accum = std::move(m_join(std::ref(accum), std::forward<RetT>(ret)));
}
for(auto& itr : m_future_list)
{
using RetT = decay_t<decltype(itr.get())>;
accum = std::move(m_join(std::ref(accum), std::forward<RetT>(itr.get())));
{
auto&& ret = itr.get();
using RetT = decay_t<decltype(ret)>;
accum = std::move(m_join(std::ref(accum), std::forward<RetT>(ret)));
}
this->clear();
return accum;
Expand Down Expand Up @@ -691,13 +693,15 @@ TaskGroup<Tp, Arg, MaxDepth>::join()
this->wait();
for(auto& itr : m_task_list)
{
using RetT = decay_t<decltype(itr->get())>;
m_join(std::forward<RetT>(itr->get()));
auto&& ret = itr->get();
using RetT = decay_t<decltype(ret)>;
m_join(std::forward<RetT>(ret));
}
for(auto& itr : m_future_list)
{
using RetT = decay_t<decltype(itr.get())>;
m_join(std::forward<RetT>(itr.get()));
auto&& ret = itr.get();
using RetT = decay_t<decltype(ret)>;
m_join(std::forward<RetT>(ret));
}
this->clear();
}
Expand Down

0 comments on commit ba7216c

Please sign in to comment.