28#if ALPAKA_DEBUG >= ALPAKA_DEBUG_MINIMAL
32#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
37 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
41 template<
typename TWorkDiv>
44 , m_kernelFnObj(
std::move(kernelFnObj))
45 , m_args(
std::forward<TArgs>(args)...)
49 "The work division and the execution task have to be of the same dimensionality!");
62 auto const blockSharedMemDynSizeBytes = std::apply(
63 [&](std::decay_t<TArgs>
const&... args)
73# if ALPAKA_DEBUG >= ALPAKA_DEBUG_FULL
74 std::cout << __func__ <<
" blockSharedMemDynSizeBytes: " << blockSharedMemDynSizeBytes <<
" B"
80 blockSharedMemDynSizeBytes);
87 acc.m_gridBlockIdx = blockThreadIdx;
90 [&](
auto&&... argsWithAcc) {
93 std::forward<
decltype(argsWithAcc)>(argsWithAcc)...);
95 std::tuple_cat(std::tie(acc), m_args));
96 std::apply(m_kernelFnObj, std::tuple_cat(std::tie(acc), m_args));
104 TKernelFnObj m_kernelFnObj;
105 std::tuple<std::decay_t<TArgs>...> m_args;
111 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
118 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
125 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
132 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
139 template<
typename TDim,
typename TIdx,
typename TKernelFnObj,
typename... TArgs>
151 template<
typename TDev,
typename TDim,
typename TIdx,
typename TKernelFn,
typename... TArgs>
161 [[maybe_unused]] TKernelFn
const& kernelFn,
169 kernelFunctionAttributes.
maxThreadsPerBlock =
static_cast<int>(props.m_blockThreadCountMax);
172 return kernelFunctionAttributes;
177 template<
typename TDev,
typename TKernelFnObj,
typename TDim,
typename TIdx,
typename... TArgs>
181 TKernelFnObj
const& ,
185 TArgs
const&... ) ->
int
#define ALPAKA_DEBUG_MINIMAL_LOG_SCOPE
The CPU serial accelerator.
The CPU serial execution task implementation.
ALPAKA_FN_HOST TaskKernelCpuSerial(TWorkDiv &&workDiv, TKernelFnObj kernelFnObj, TArgs &&... args)
ALPAKA_FN_HOST auto operator()() const -> void
Executes the kernel function object.
A basic class holding the work division as grid block extent, block thread and thread element extent.
ALPAKA_FN_HOST_ACC auto checkKernelReturnType(TKernelFnObj const &, TAcc const &, TArgs &&...) -> void
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.
constexpr std::uint32_t BlockSharedDynMemberAllocKiB
ALPAKA_FN_HOST auto getAccDevProps(TDev const &dev) -> AccDevProps< Dim< TAcc >, Idx< TAcc > >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getBlockSharedMemDynSizeBytes(TKernelFnObj const &kernelFnObj, Vec< TDim, Idx< TAcc > > const &blockThreadExtent, Vec< TDim, Idx< TAcc > > const &threadElemExtent, TArgs const &... args) -> std::size_t
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto freeSharedVars(TBlockSharedMemSt &blockSharedMemSt) -> void
Frees all memory used by block shared variables.
typename trait::DimType< T >::type Dim
The dimension type trait alias template to remove the ::type.
Kernel function attributes struct. Attributes are filled by calling the API of the accelerator using ...
int maxDynamicSharedSizeBytes
The accelerator type trait.
The dimension getter type trait.
static ALPAKA_FN_HOST auto getFunctionAttributes(TDev const &dev, TKernelFn const &kernelFn, TArgs &&... args) -> alpaka::KernelFunctionAttributes
The structure template to access to the functions attributes of a kernel function object.
static ALPAKA_FN_HOST auto getMaxActiveBlocks(TKernelFnObj const &, TDev const &, alpaka::Vec< TDim, TIdx > const &, alpaka::Vec< TDim, TIdx > const &, TArgs const &...) -> int
Get maximum requested blocks for cooperative kernel trait.