/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/interpolation/spline_interpolator_1d_stack.hh Source File#
|
DiFfRG
|
spline_interpolator_1d_stack.hh
Go to the documentation of this file.
16 template <typename NT, typename Coordinates, typename DefaultMemorySpace = CPU_memory> class SplineInterpolator1DStack
114 NT KOKKOS_FUNCTION operator()(const typename Coordinates::ctype s, const typename Coordinates::ctype x) const
118 xidx = Kokkos::max(static_cast<decltype(xidx)>(0), Kokkos::min(xidx, static_cast<decltype(xidx)>(sizes[1] - 1)));
120 Kokkos::max(static_cast<decltype(_sidx)>(0), Kokkos::min(_sidx, static_cast<decltype(_sidx)>(sizes[0] - 1)));
206 using ValueViewType = Kokkos::View<NT **, DefaultMemorySpace, Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
207 using CoeffViewType = Kokkos::View<NT **, DefaultMemorySpace, Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
216 mutable SplineInterpolator1DStack<NT, Coordinates, other_memory_space> *other_instance = nullptr;
236 u[i] = (host_values(sidx, i + 1) - host_values(sidx, i)) - (host_values(sidx, i) - host_values(sidx, i - 1));
A linear interpolator for 1D data, using texture memory on the GPU and floating point arithmetic on t...
Definition spline_interpolator_1d_stack.hh:17
other_memory_space_t< DefaultMemorySpace > other_memory_space
Definition spline_interpolator_1d_stack.hh:22
auto & GPU() const
Definition spline_interpolator_1d_stack.hh:157
NT value_type
Definition spline_interpolator_1d_stack.hh:24
Kokkos::View< NT **, DefaultMemorySpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > CoeffViewType
Definition spline_interpolator_1d_stack.hh:207
const Coordinates & get_coordinates() const
Get the coordinate system of the data.
Definition spline_interpolator_1d_stack.hh:189
SplineInterpolator1DStack(const Coordinates &coordinates)
Construct a SplineInterpolator1DStack with zeroed data and a coordinate system.
Definition spline_interpolator_1d_stack.hh:32
KOKKOS_FUNCTION ~SplineInterpolator1DStack()
Definition spline_interpolator_1d_stack.hh:56
bool owns_other_instance
Definition spline_interpolator_1d_stack.hh:217
void build_y2(const size_t sidx, const ctype lower_y1, const ctype upper_y1)
Definition spline_interpolator_1d_stack.hh:219
CoeffViewType device_coeffs
Definition spline_interpolator_1d_stack.hh:212
typename CoeffViewType::host_mirror_type HostCoeffViewType
Definition spline_interpolator_1d_stack.hh:209
const Coordinates coordinates
Definition spline_interpolator_1d_stack.hh:203
typename ValueViewType::host_mirror_type HostValueViewType
Definition spline_interpolator_1d_stack.hh:208
DefaultMemorySpace memory_space
Definition spline_interpolator_1d_stack.hh:21
SplineInterpolator1DStack< NT, Coordinates, other_memory_space > * other_instance
Definition spline_interpolator_1d_stack.hh:216
KOKKOS_FUNCTION SplineInterpolator1DStack(const SplineInterpolator1DStack &other)
Copy constructor for SplineInterpolator1DStack. This is ONLY for usage inside Kokkos parallel loops.
Definition spline_interpolator_1d_stack.hh:48
NT operator[](size_t i) const
Definition spline_interpolator_1d_stack.hh:145
auto & CPU() const
Definition spline_interpolator_1d_stack.hh:156
void update(const View &view, const ctype lower_y1=std::numeric_limits< ctype >::max(), const ctype upper_y1=std::numeric_limits< ctype >::max())
Definition spline_interpolator_1d_stack.hh:87
auto & get_on() const
Definition spline_interpolator_1d_stack.hh:159
Kokkos::View< NT **, DefaultMemorySpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > ValueViewType
Definition spline_interpolator_1d_stack.hh:206
const device::array< size_t, 2 > sizes
Definition spline_interpolator_1d_stack.hh:204
typename Coordinates::ctype ctype
Definition spline_interpolator_1d_stack.hh:23
void update(const NT2 *in_data, const ctype lower_y1=std::numeric_limits< ctype >::max(), const ctype upper_y1=std::numeric_limits< ctype >::max())
Definition spline_interpolator_1d_stack.hh:62
static constexpr size_t dim
Definition spline_interpolator_1d_stack.hh:25
ValueViewType device_values
Definition spline_interpolator_1d_stack.hh:211
HostValueViewType host_values
Definition spline_interpolator_1d_stack.hh:213
NT KOKKOS_FUNCTION operator()(const typename Coordinates::ctype s, const typename Coordinates::ctype x) const
Interpolate the data at a given point.
Definition spline_interpolator_1d_stack.hh:114
HostCoeffViewType host_coeffs
Definition spline_interpolator_1d_stack.hh:214
Definition complex_math.hh:10
std::conditional_t< std::is_same_v< MemorySpace, GPU_memory >, CPU_memory, GPU_memory > other_memory_space_t
Definition kokkos.hh:58
Generated by