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

[WIP] Add a conditional definition of AccThreadSeq for the Omp4 backend #157

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 16 additions & 0 deletions include/cupla/traits/IsThreadSeqAcc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ namespace traits
};
#endif

#ifdef ALPAKA_ACC_CPU_BT_OMP4_ENABLED
template<
typename T_KernelDim,
typename T_IndexType
>
struct IsThreadSeqAcc<
::alpaka::acc::AccCpuOmp4<
T_KernelDim,
T_IndexType
>
>
{
static constexpr bool value = true;
};
#endif

} // namespace traits
} // namespace CUPLA_ACCELERATOR_NAMESPACE
} // namespace cupla
15 changes: 11 additions & 4 deletions include/cupla/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,17 @@ inline namespace CUPLA_ACCELERATOR_NAMESPACE
#endif

#ifdef ALPAKA_ACC_CPU_BT_OMP4_ENABLED
using Acc = ::alpaka::acc::AccCpuOmp4<
KernelDim,
IdxType
>;
#if (CUPLA_NUM_SELECTED_DEVICES == 1)
using Acc = ::alpaka::acc::AccCpuOmp4<
KernelDim,
IdxType
>;
#else
using AccThreadSeq = ::alpaka::acc::AccCpuOmp4<
KernelDim,
IdxType
>;
#endif
#endif

#endif
Expand Down