38#ifdef __cpp_lib_format
44#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
48 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
49 class TaskKernelCpuSerial;
55 template<
typename TDim,
typename TIdx>
71# ifdef ALPAKA_DISABLE_VENDOR_RNG
80 sizeof(TIdx) >=
sizeof(int),
81 "Index type is not supported, consider using int or a larger type.");
85 template<
typename TDim2,
typename TIdx2,
typename TKernelFnObj,
typename... TArgs>
86 friend class ::alpaka::TaskKernelCpuSerial;
94 template<
typename TWorkDiv>
97 , gb::
IdxGbRef<TDim, TIdx>(m_gridBlockIdx)
100 , m_gridBlockIdx(
Vec<TDim, TIdx>::zeros())
112 template<
typename TDim,
typename TIdx>
119 template<
typename TDim,
typename TIdx>
125 template<
typename TDim,
typename TIdx>
131 template<
typename TDim,
typename TIdx>
137 static_cast<TIdx
>(1),
141 std::numeric_limits<TIdx>::max(),
145 static_cast<TIdx
>(1),
149 std::numeric_limits<TIdx>::max(),
160 template<
typename TDim,
typename TIdx>
165# if ALPAKA_COMP_CLANG
166# pragma clang diagnostic push
167# pragma clang diagnostic ignored "-Wexit-time-destructors"
169 using namespace std::literals;
170 static std::string
const accName =
171# ifdef __cpp_lib_format
177# if ALPAKA_COMP_CLANG
178# pragma clang diagnostic pop
184 template<
typename TDim,
typename TIdx>
191 template<
typename TDim,
typename TIdx>
198 template<
typename TDim,
typename TIdx,
typename TWorkDiv,
typename TKernelFnObj,
typename... TArgs>
202 TWorkDiv
const& workDiv,
203 TKernelFnObj
const& kernelFnObj,
206 if(workDiv.m_blockThreadExtent.prod() !=
static_cast<TIdx
>(1u))
208 throw std::runtime_error(
209 "The given work division is not valid for a single thread Acc: "
216 std::forward<TArgs>(args)...);
221 template<
typename TDim,
typename TIdx,
typename TWorkDiv,
typename TKernelFnObj,
typename... TArgs>
225 TWorkDiv
const& workDiv,
226 TKernelFnObj
const& kernelFnObj,
230 if(gridBlockExtent.prod() !=
static_cast<TIdx
>(1u))
232 throw std::runtime_error(
233 "Serial accelerator supports only a single block operation with cooperative kernel!\n"
234 "Consider useing a different CPU accelerator.");
240 std::forward<TArgs>(args)...);
245 template<
typename TDim,
typename TIdx>
252 template<
typename TDim,
typename TIdx>
258 template<
typename TDim,
typename TIdx>
264 template<
typename TDim,
typename TIdx>
The CPU serial accelerator.
auto operator=(AccCpuSerial &&) -> AccCpuSerial &=delete
auto operator=(AccCpuSerial const &) -> AccCpuSerial &=delete
AccCpuSerial(AccCpuSerial &&)=delete
AccCpuSerial(AccCpuSerial const &)=delete
Dynamic block shared memory provider using fixed-size member array to allocate memory on the stack or...
static constexpr auto staticAllocBytes() -> std::uint32_t
auto staticMemBegin() const -> uint8_t *
auto staticMemCapacity() const -> std::uint32_t
Static block shared memory provider using a pointer to externally allocated fixed-size memory,...
The no op block synchronization.
The NoOp grid synchronization for accelerators that only support a single thread with cooperative ker...
The serial CPU memory fence.
The CPU serial execution task implementation.
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST_ACC constexpr auto ones() -> Vec< TDim, TVal >
One value constructor.
A basic class holding the work division as grid block extent, block thread and thread element extent.
A zero block thread 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
The alpaka accelerator library.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getWorkDiv(TWorkDiv const &workDiv) -> Vec< Dim< TWorkDiv >, Idx< TWorkDiv > >
Get the extent requested.
ALPAKA_FN_HOST auto getMemBytes(TDev const &dev) -> std::size_t
ALPAKA_FN_HOST auto getAccName() -> std::string
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 createTaskCooperativeKernel(TWorkDiv const &workDiv, TKernelFnObj const &kernelFnObj, TArgs &&... args)
The cooperative kernel execution task creation 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) -> 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.