alpaka
Abstraction Library for Parallel Kernel Acceleration
|
The trait for getting the schedule to use when a kernel is run using the CpuOmp2Blocks accelerator. More...
#include <Traits.hpp>
Static Public Member Functions | |
template<typename TDim , typename... TArgs> | |
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST auto | getOmpSchedule ([[maybe_unused]] TKernelFnObj const &kernelFnObj, [[maybe_unused]] Vec< TDim, Idx< TAcc >> const &blockThreadExtent, [[maybe_unused]] Vec< TDim, Idx< TAcc >> const &threadElemExtent, [[maybe_unused]] TArgs const &... args) -> TraitNotSpecialized |
The trait for getting the schedule to use when a kernel is run using the CpuOmp2Blocks accelerator.
Has no effect on other accelerators.
A user could either specialize this trait for their kernel, or define a public static member ompScheduleKind of type alpaka::omp::Schedule, and additionally also int member ompScheduleChunkSize. In the latter case, alpaka never odr-uses these members.
In case schedule kind and chunk size are compile-time constants, setting then inside kernel may benefit performance.
TKernelFnObj | The kernel function object. |
TAcc | The accelerator. |
The default implementation behaves as if the trait was not specialized.
Definition at line 127 of file Traits.hpp.
|
inlinestatic |
kernelFnObj | The kernel object for which the schedule should be returned. |
blockThreadExtent | The block thread extent. |
threadElemExtent | The thread element extent. |
TArgs | The kernel invocation argument types pack. |
args,... | The kernel invocation arguments. |
Definition at line 153 of file Traits.hpp.