17namespace alpaka::onHost::internal
21 template<
typename T_DataType>
23 onAcc::concepts::Acc
auto const& acc,
24 alpaka::concepts::Vector
auto extents,
25 T_DataType
const& initValue,
26 alpaka::concepts::IMdSpan
auto&&... inputs)
const
30 return simdGrid.concurrent(
33 [&](onAcc::concepts::Acc
auto const&,
34 alpaka::concepts::SimdPtr
auto&& in0,
35 alpaka::concepts::SimdPtr
auto&&... inOther)
38 alpaka::concepts::Vector
auto iotaOffsetMd = in0.getIdx();
39 T_DataType linearBaseOffset
40 =
static_cast<T_DataType
>(
linearize(extents, iotaOffsetMd)) + initValue;
41 alpaka::concepts::Simd
auto result
42 = SimdType([&](
auto const& laneId)
constexpr
43 {
return linearBaseOffset +
static_cast<T_DataType
>(laneId); });
52 template<
typename T_DataType>
55 alpaka::concepts::Executor
auto const exec,
56 alpaka::concepts::Vector
auto const& extents,
57 T_DataType
const& initValue,
58 alpaka::concepts::IMdSpan
auto&&... inputs)
60 Vec const extentMd = extents;
61 auto frameSpec = getFrameSpec<T_DataType>(
queue.getDevice(), exec, extentMd);
#define ALPAKA_FN_ACC
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_F...
#define ALPAKA_TYPEOF(...)
Get the type of instance.
#define ALPAKA_FORWARD(instance)
Perfectly forward an instance as argument.
#define ALPAKA_LOG_INFO(logLvl, callable)
Write a meta data message to the output.
constexpr auto threadsInGrid
constexpr auto demangledName()
typename GetValueType< T >::type GetValueType_t
constexpr T_IntegralType linearize(Vec< T_IntegralType, T_dim - 1u, T_Storage > const &dim, Vec< T_IntegralType, T_dim, T_OtherStorage > const &idx)
Give the linear index of an N-dimensional index within an N-dimensional index space.
ALPAKA_FN_HOST_ACC Vec(T_1, T_Args...) -> Vec< T_1, uint32_t(sizeof...(T_Args)+1u), ArrayStorage< T_1, uint32_t(sizeof...(T_Args)+1u)> >
ALPAKA_FN_HOST KernelBundle(TKernelFn const &, TArgs &&...) -> KernelBundle< TKernelFn, TArgs... >
User defined deduction guide with trailing return type. For CTAD during the construction.
constexpr decltype(auto) pCast(auto &&input)
Performs a static_cast on the storage type of combined data type.