41 #ifdef ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLED
44 # error If ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLED is set, the compiler has to support OpenMP 2.0 or higher!
51 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
52 class TaskKernelCpuOmp2Threads;
58 template<
typename TDim,
typename TIdx>
73 # ifdef ALPAKA_DISABLE_VENDOR_RNG
82 sizeof(TIdx) >=
sizeof(
int),
83 "Index type is not supported, consider using int or a larger type.");
87 template<
typename TDim2,
typename TIdx2,
typename TKernelFnObj,
typename... TArgs>
88 friend class ::alpaka::TaskKernelCpuOmp2Threads;
96 template<
typename TWorkDiv>
99 , gb::
IdxGbRef<TDim, TIdx>(m_gridBlockIdx)
105 []() noexcept {
return (::omp_get_thread_num() == 0); })
112 Vec<TDim, TIdx>
mutable m_gridBlockIdx;
118 template<
typename TDim,
typename TIdx>
125 template<
typename TDim,
typename TIdx>
131 template<
typename TDim,
typename TIdx>
137 template<
typename TDim,
typename TIdx>
143 auto const blockThreadCountMax = alpaka::core::clipCast<TIdx>(
std::min(4, ::omp_get_max_threads()));
145 auto const blockThreadCountMax = alpaka::core::clipCast<TIdx>(::omp_get_max_threads());
149 static_cast<TIdx
>(1),
170 template<
typename TDim,
typename TIdx>
175 return "AccCpuOmp2Threads<" + std::to_string(TDim::value) +
"," + core::demangled<TIdx> +
">";
180 template<
typename TDim,
typename TIdx>
187 template<
typename TDim,
typename TIdx>
194 template<
typename TDim,
typename TIdx,
typename TWorkDiv,
typename TKernelFnObj,
typename... TArgs>
198 TWorkDiv
const& workDiv,
199 TKernelFnObj
const& kernelFnObj,
205 std::forward<TArgs>(args)...);
210 template<
typename TDim,
typename TIdx>
217 template<
typename TDim,
typename TIdx>
223 template<
typename TDim,
typename TIdx>
229 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 constexpr ALPAKA_FN_HOST_ACC auto all(TVal const &val) -> Vec< TDim, TVal >
Single value constructor.
ALPAKA_NO_HOST_ACC_WARNING static constexpr ALPAKA_FN_HOST_ACC auto zeros() -> Vec< TDim, TIdx >
Zero 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
The single-threaded warp to emulate it on CPUs.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto max(T const &max_ctx, Tx const &x, Ty const &y)
Returns the larger of two arguments. NaNs are treated as missing data (between a NaN and a numeric va...
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto min(T const &min_ctx, Tx const &x, Ty const &y)
Returns the smaller of two arguments. NaNs are treated as missing data (between a NaN and a numeric v...
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.