40#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
44 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
45 class TaskKernelCpuSerial;
51 template<
typename TDim,
typename TIdx>
66# ifdef ALPAKA_DISABLE_VENDOR_RNG
75 sizeof(TIdx) >=
sizeof(
int),
76 "Index type is not supported, consider using int or a larger type.");
80 template<
typename TDim2,
typename TIdx2,
typename TKernelFnObj,
typename... TArgs>
81 friend class ::alpaka::TaskKernelCpuSerial;
89 template<
typename TWorkDiv>
92 , gb::
IdxGbRef<TDim, TIdx>(m_gridBlockIdx)
95 , m_gridBlockIdx(
Vec<TDim, TIdx>::zeros())
107 template<
typename TDim,
typename TIdx>
108 struct AccType<AccCpuSerial<TDim, TIdx>>
110 using type = AccCpuSerial<TDim, TIdx>;
114 template<
typename TDim,
typename TIdx>
115 struct IsSingleThreadAcc<AccCpuSerial<TDim, TIdx>> : std::true_type
120 template<
typename TDim,
typename TIdx>
121 struct IsMultiThreadAcc<AccCpuSerial<TDim, TIdx>> : std::false_type
126 template<
typename TDim,
typename TIdx>
127 struct GetAccDevProps<AccCpuSerial<TDim, TIdx>>
132 static_cast<TIdx
>(1),
134 Vec<TDim, TIdx>::all(std::numeric_limits<TIdx>::max()),
136 std::numeric_limits<TIdx>::max(),
140 static_cast<TIdx
>(1),
142 Vec<TDim, TIdx>::all(std::numeric_limits<TIdx>::max()),
144 std::numeric_limits<TIdx>::max(),
153 template<
typename TDim,
typename TIdx>
154 struct GetAccName<AccCpuSerial<TDim, TIdx>>
163 template<
typename TDim,
typename TIdx>
164 struct DevType<AccCpuSerial<TDim, TIdx>>
170 template<
typename TDim,
typename TIdx>
171 struct DimType<AccCpuSerial<TDim, TIdx>>
177 template<
typename TDim,
typename TIdx,
typename TWorkDiv,
typename TKernelFnObj,
typename... TArgs>
178 struct CreateTaskKernel<AccCpuSerial<TDim, TIdx>, TWorkDiv, TKernelFnObj, TArgs...>
181 TWorkDiv
const& workDiv,
182 TKernelFnObj
const& kernelFnObj,
185 if(workDiv.m_blockThreadExtent.prod() !=
static_cast<TIdx
>(1u))
187 throw std::runtime_error(
188 "The given work division is not valid for a single thread Acc: "
189 +
getAccName<AccCpuSerial<TDim, TIdx>>() +
". Threads per block should be 1!");
192 return TaskKernelCpuSerial<TDim, TIdx, TKernelFnObj, TArgs...>(
195 std::forward<TArgs>(args)...);
200 template<
typename TDim,
typename TIdx>
201 struct PlatformType<AccCpuSerial<TDim, TIdx>>
203 using type = PlatformCpu;
207 template<
typename TDim,
typename TIdx>
208 struct IdxType<AccCpuSerial<TDim, TIdx>>
213 template<
typename TDim,
typename TIdx>
219 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 serial CPU memory fence.
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
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_FN_HOST auto getAccName() -> std::string
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
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
static ALPAKA_FN_HOST auto getAccName() -> std::string