19namespace alpaka::onHost::internal
21 struct SimdTransformKernel
24 onAcc::concepts::Acc
auto const& acc,
25 alpaka::concepts::IMdSpan
auto&& output,
27 alpaka::concepts::IDataSource
auto&&... inputs)
const
32 return simdGrid.concurrent(
35 [&](
auto const& acc,
auto out,
auto&&... in)
36 { out = callFunctor(acc, func, ALPAKA_FORWARD(in)...); },
45 [&](
auto const& acc,
auto outPtr,
auto const&... inPtr)
constexpr
47 outPtr = loadAncExecuteScalarOp(
48 std::make_integer_sequence<uint32_t, ALPAKA_TYPEOF(outPtr)::width()>{},
49 [](alpaka::concepts::CVector
auto idx,
52 auto&&...
data)
constexpr { return callFunctor(acc, func, data[idx.x()]...); },
62 return simdGrid.concurrent(
65 [&](
auto const& acc,
auto out,
auto const&... in) { out = callFunctor(acc, func, in.load()...); },
71 template<uint32_t... T_idx>
73 std::integer_sequence<uint32_t, T_idx...>,
83 inline void transform(
90 auto extentMd = onHost::getExtents(out);
92 auto frameSpec = getFrameSpec<DataType>(
queue.getDevice(), exec, extentMd);
95 onHost::logger::memory,
99 ss <<
"transform{ extents=" << extentMd <<
", value_type=" << onHost::demangledName<DataType>() <<
", "
100 << frameSpec <<
", fn=" << onHost::demangledName(fn) <<
" }";
#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_FN_INLINE
Macro defining the inline function attribute.
#define ALPAKA_FORWARD(instance)
Perfectly forward an instance as argument.
Concept to check for an executor.
Interface concept for objects describing multidimensional memory access.
#define ALPAKA_LOG_INFO(logLvl, callable)
Write a meta data message to the output.
constexpr auto threadsInGrid
decltype(auto) data(auto &&any)
pointer to data of an object
typename GetValueType< T >::type GetValueType_t
ALPAKA_FN_HOST_ACC StencilFunc(T_Func &&) -> StencilFunc< T_Func >
Vec< T, sizeof...(T_values), detail::CVec< T, T_values... > > CVec
A vector with compile-time known values.
ALPAKA_FN_HOST_ACC ScalarFunc(T_Func &&) -> ScalarFunc< T_Func >
constexpr bool isSpecializationOf_v
checks if T is a instance of U
ALPAKA_FN_HOST_ACC Simd(T_1, T_Args...) -> Simd< T_1, uint32_t(sizeof...(T_Args)+1u)>