10 template <
unsigned long Po
int,
unsigned long Index,
typename Weights>
12 const Weights& wlo,
const Weights& whi) {
23 template <
unsigned long Po
int,
unsigned long Index,
typename Indices>
25 const Indices& args) {
27 return args[
Index] - 1;
36 template <
unsigned long ScatterPoint,
unsigned long...
Index,
typename View,
typename T,
39 const std::index_sequence<Index...>&,
const View& view,
42 Kokkos::atomic_add(&view(interpolationIndex<ScatterPoint, Index>(args)...),
43 val * (interpolationWeight<ScatterPoint, Index>(wlo, whi) * ...));
46 template <
unsigned long... ScatterPoint,
typename View,
typename T,
typename IndexType>
48 const std::index_sequence<ScatterPoint...>&,
const View& view,
52 (scatterToPoint<ScatterPoint>(std::make_index_sequence<View::rank>{}, view, wlo, whi,
57 template <
unsigned long GatherPoint,
unsigned long...
Index,
typename View,
typename T,
60 const std::index_sequence<Index...>&,
const View& view,
63 return (interpolationWeight<GatherPoint, Index>(wlo, whi) * ...)
64 * view(interpolationIndex<GatherPoint, Index>(args)...);
67 template <
unsigned long... GatherPoint,
typename View,
typename T,
typename IndexType>
69 const std::index_sequence<GatherPoint...>&,
const View& view,
73 return (gatherFromPoint<GatherPoint>(std::make_index_sequence<View::rank>{}, view, wlo,
Implementations for FFT constructor/destructor and transforms.
KOKKOS_INLINE_FUNCTION constexpr Weights::value_type interpolationWeight(const Weights &wlo, const Weights &whi)
KOKKOS_INLINE_FUNCTION constexpr View::value_type gatherFromPoint(const std::index_sequence< Index... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args)
KOKKOS_INLINE_FUNCTION constexpr View::value_type gatherFromField(const std::index_sequence< GatherPoint... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args)
KOKKOS_INLINE_FUNCTION constexpr Indices::value_type interpolationIndex(const Indices &args)
KOKKOS_INLINE_FUNCTION constexpr void scatterToPoint(const std::index_sequence< Index... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args, const T &val)
KOKKOS_INLINE_FUNCTION constexpr void scatterToField(const std::index_sequence< ScatterPoint... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args, T val=1)