8#include <Kokkos_Core.hpp>
35template <
typename TeamHandleType, KokkosViewRank<2> AViewType,
36 KokkosViewRank<1> XType, KokkosViewRank<1> XOffsType,
37 RBFFunction RbfFuncType>
38KOKKOS_FORCEINLINE_FUNCTION
void
39TeamFillA(
const TeamHandleType &teamHandle,
const AViewType &A,
const XType &X,
40 const XOffsType &XOffs,
const RbfFuncType &func) {
41 const int_t N = A.extent_int(0);
43 Kokkos::TeamThreadRange(teamHandle, N), [&](
const int_t &i) {
44 const auto x = X(XOffs(i));
46 Kokkos::ThreadVectorRange(teamHandle, i, N), [&](
const int &j) {
78template <
typename TeamHandleType, KokkosViewRank<2> AViewType,
79 KokkosViewRank<1> XType, KokkosViewRank<1> XOffsType,
80 KokkosViewRank<1> YType, KokkosViewRank<1> YOffsType,
81 RBFFunction RbfFuncType>
82KOKKOS_FORCEINLINE_FUNCTION
void
83TeamFillE(
const TeamHandleType &teamHandle, AViewType &A,
const XType &X,
84 const XOffsType &XOffs,
const YType &Y,
const YOffsType &YOffs,
85 const RbfFuncType &func) {
86 const int_t N = A.extent_int(0);
87 const int_t M = A.extent_int(1);
90 Kokkos::TeamThreadRange(teamHandle, N), [&](
const int_t &i) {
91 const auto y = Y(YOffs(i));
93 Kokkos::ThreadVectorRange(teamHandle, M), [&](
const int_t &j) {
113template <
typename TeamHandleType, KokkosViewRank<1> BViewType,
114 KokkosViewRank<1> XType, KokkosViewRank<1> XOffsType>
115KOKKOS_FORCEINLINE_FUNCTION
void TeamFillB(
const TeamHandleType &teamHandle,
116 BViewType &B,
const XType &X,
117 const XOffsType &XOffs) {
118 const int_t N = B.extent_int(0);
119 Kokkos::parallel_for(Kokkos::TeamVectorRange(teamHandle, N),
120 [&](
const int_t &i) { B(i) = X(XOffs(i)); });
KOKKOS_FORCEINLINE_FUNCTION void TeamFillA(const TeamHandleType &teamHandle, const AViewType &A, const XType &X, const XOffsType &XOffs, const RbfFuncType &func)
Fills the RBF matrix A in parallel.
KOKKOS_FORCEINLINE_FUNCTION void TeamFillB(const TeamHandleType &teamHandle, BViewType &B, const XType &X, const XOffsType &XOffs)
Fills the vector of known source values B in parallel.
KOKKOS_INLINE_FUNCTION fp_t DistanceNoCheck(const ::ArborX::Point< Dim, coordinates_t > &lhs, const ::ArborX::Point< Dim, coordinates_t > &rhs)
Returns the euclidian norm between two points by performing a square root operation on the SquaredDif...
KOKKOS_FORCEINLINE_FUNCTION void TeamFillE(const TeamHandleType &teamHandle, AViewType &A, const XType &X, const XOffsType &XOffs, const YType &Y, const YOffsType &YOffs, const RbfFuncType &func)
Fills the RBF evaluation matrix E in parallel.