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); })
106 , m_gridBlockIdx(Vec<TDim, TIdx>::zeros())
112 Vec<TDim, TIdx>
mutable m_gridBlockIdx;
118 template<
typename TDim,
typename TIdx>
119 struct AccType<AccCpuOmp2Threads<TDim, TIdx>>
121 using type = AccCpuOmp2Threads<TDim, TIdx>;
125 template<
typename TDim,
typename TIdx>
126 struct IsSingleThreadAcc<AccCpuOmp2Threads<TDim, TIdx>> : std::false_type
131 template<
typename TDim,
typename TIdx>
132 struct IsMultiThreadAcc<AccCpuOmp2Threads<TDim, TIdx>> : std::true_type
137 template<
typename TDim,
typename TIdx>
138 struct GetAccDevProps<AccCpuOmp2Threads<TDim, TIdx>>
149 static_cast<TIdx
>(1),
151 Vec<TDim, TIdx>::all(std::numeric_limits<TIdx>::max()),
153 std::numeric_limits<TIdx>::max(),
161 std::numeric_limits<TIdx>::max(),
170 template<
typename TDim,
typename TIdx>
171 struct GetAccName<AccCpuOmp2Threads<TDim, TIdx>>
180 template<
typename TDim,
typename TIdx>
181 struct DevType<AccCpuOmp2Threads<TDim, TIdx>>
187 template<
typename TDim,
typename TIdx>
188 struct DimType<AccCpuOmp2Threads<TDim, TIdx>>
194 template<
typename TDim,
typename TIdx,
typename TWorkDiv,
typename TKernelFnObj,
typename... TArgs>
195 struct CreateTaskKernel<AccCpuOmp2Threads<TDim, TIdx>, TWorkDiv, TKernelFnObj, TArgs...>
198 TWorkDiv
const& workDiv,
199 TKernelFnObj
const& kernelFnObj,
202 return TaskKernelCpuOmp2Threads<TDim, TIdx, TKernelFnObj, TArgs...>(
205 std::forward<TArgs>(args)...);
210 template<
typename TDim,
typename TIdx>
211 struct PlatformType<AccCpuOmp2Threads<TDim, TIdx>>
213 using type = PlatformCpu;
217 template<
typename TDim,
typename TIdx>
218 struct IdxType<AccCpuOmp2Threads<TDim, 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.
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
The single-threaded warp to emulate it on CPUs.
auto clipCast(V const &val) -> T
The alpaka accelerator library.
ALPAKA_FN_HOST auto getAccDevProps(TDev const &dev) -> AccDevProps< Dim< TAcc >, Idx< TAcc > >
ALPAKA_FN_HOST auto createTaskKernel(TWorkDiv const &workDiv, TKernelFnObj const &kernelFnObj, TArgs &&... args)
Creates a kernel execution task.
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).
typename trait::AccToTag< TAcc >::type AccToTag
maps an acc type to a tag type
typename trait::TagToAcc< TTag, TDim, TIdx >::type TagToAcc
maps a tag type to an acc type
The acceleration properties on a device.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
static ALPAKA_FN_HOST auto getAccName() -> std::string