38#ifdef __cpp_lib_format
44#ifdef ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLED
47# error If ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLED is set, the compiler has to support OpenMP 2.0 or higher!
54 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
55 class TaskKernelCpuOmp2Threads;
61 template<
typename TDim,
typename TIdx>
76# ifdef ALPAKA_DISABLE_VENDOR_RNG
85 sizeof(TIdx) >=
sizeof(int),
86 "Index type is not supported, consider using int or a larger type.");
90 template<
typename TDim2,
typename TIdx2,
typename TKernelFnObj,
typename... TArgs>
91 friend class ::alpaka::TaskKernelCpuOmp2Threads;
99 template<
typename TWorkDiv>
102 , gb::
IdxGbRef<TDim, TIdx>(m_gridBlockIdx)
108 []()
noexcept {
return (::omp_get_thread_num() == 0); })
115 Vec<TDim, TIdx>
mutable m_gridBlockIdx;
121 template<
typename TDim,
typename TIdx>
128 template<
typename TDim,
typename TIdx>
134 template<
typename TDim,
typename TIdx>
140 template<
typename TDim,
typename TIdx>
152 static_cast<TIdx
>(1),
156 std::numeric_limits<TIdx>::max(),
164 std::numeric_limits<TIdx>::max(),
173 template<
typename TDim,
typename TIdx>
178# if ALPAKA_COMP_CLANG
179# pragma clang diagnostic push
180# pragma clang diagnostic ignored "-Wexit-time-destructors"
182 using namespace std::literals;
183 static std::string
const accName =
184# ifdef __cpp_lib_format
191# if ALPAKA_COMP_CLANG
192# pragma clang diagnostic pop
198 template<
typename TDim,
typename TIdx>
205 template<
typename TDim,
typename TIdx>
212 template<
typename TDim,
typename TIdx,
typename TWorkDiv,
typename TKernelFnObj,
typename... TArgs>
216 TWorkDiv
const& workDiv,
217 TKernelFnObj
const& kernelFnObj,
223 std::forward<TArgs>(args)...);
228 template<
typename TDim,
typename TIdx>
235 template<
typename TDim,
typename TIdx>
241 template<
typename TDim,
typename TIdx>
247 template<
typename TDim,
typename TIdx>
The CPU OpenMP 2.0 thread accelerator.
AccCpuOmp2Threads(AccCpuOmp2Threads &&)=delete
AccCpuOmp2Threads(AccCpuOmp2Threads const &)=delete
auto operator=(AccCpuOmp2Threads &&) -> AccCpuOmp2Threads &=delete
auto operator=(AccCpuOmp2Threads const &) -> AccCpuOmp2Threads &=delete
Dynamic block shared memory provider using fixed-size member array to allocate memory on the stack or...
auto staticMemBegin() const -> uint8_t *
auto staticMemCapacity() const -> std::uint32_t
The OpenMP barrier block synchronization.
The CPU OpenMP 2.0 block memory fence.
The CPU OpenMP 2.0 thread accelerator execution task.
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST_ACC constexpr auto zeros() -> Vec< TDim, TVal >
Zero value constructor.
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST_ACC constexpr auto all(TVal const &val) -> Vec< TDim, TVal >
Single value constructor.
A basic class holding the work division as grid block extent, block thread and thread element extent.
The OpenMP accelerator index provider.
A IdxGbRef grid block index.
IdxGbRef(Vec< TDim, TIdx > const &gridBlockIdx)
The standard library math trait specializations.
"Tiny" state mersenne twister implementation
constexpr std::string_view demangled
auto clipCast(V const &val) -> T
The alpaka accelerator library.
ALPAKA_FN_HOST auto getMemBytes(TDev const &dev) -> std::size_t
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto syncBlockThreads(TBlockSync const &blockSync) -> void
Synchronizes all threads within the current block (independently for all blocks).
The acceleration properties on a device.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
The accelerator type trait.
static ALPAKA_FN_HOST auto createTaskKernel(TWorkDiv const &workDiv, TKernelFnObj const &kernelFnObj, TArgs &&... args)
The kernel execution task creation trait.
The dimension getter type trait.
static ALPAKA_FN_HOST auto getAccDevProps(DevCpu const &dev) -> alpaka::AccDevProps< TDim, TIdx >
The device properties get trait.
static ALPAKA_FN_HOST auto getAccName() -> std::string
The accelerator name trait.
The multi thread accelerator trait.
The single thread accelerator trait.
The single-threaded warp to emulate it on CPUs.