/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/interpolation/linear_interpolator_1d.hh Source File#
|
DiFfRG
|
linear_interpolator_1d.hh
Go to the documentation of this file.
15 template <typename NT, typename Coordinates, typename DefaultMemorySpace = CPU_memory> class LinearInterpolator1D
105 idx = Kokkos::max(static_cast<decltype(idx)>(0), Kokkos::min(idx, static_cast<decltype(idx)>(size - 1)));
A linear interpolator for 1D data, both on GPU and CPU.
Definition linear_interpolator_1d.hh:16
LinearInterpolator1D< NT, Coordinates, other_memory_space > * other_instance
Definition linear_interpolator_1d.hh:174
void update(const NT2 *in_data)
Definition linear_interpolator_1d.hh:58
const Coordinates & get_coordinates() const
Get the coordinate system of the data.
Definition linear_interpolator_1d.hh:124
NT operator[](size_t i) const
Definition linear_interpolator_1d.hh:86
Kokkos::View< NT *, DefaultMemorySpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > ViewType
Definition linear_interpolator_1d.hh:168
void update(const View &view)
Definition linear_interpolator_1d.hh:73
HostViewType host_data
Definition linear_interpolator_1d.hh:172
DefaultMemorySpace memory_space
Definition linear_interpolator_1d.hh:20
KOKKOS_FUNCTION ~LinearInterpolator1D()
Definition linear_interpolator_1d.hh:53
NT KOKKOS_FUNCTION operator()(const typename Coordinates::ctype x) const
Interpolate the data at a given point.
Definition linear_interpolator_1d.hh:101
other_memory_space_t< DefaultMemorySpace > other_memory_space
Definition linear_interpolator_1d.hh:21
ViewType device_data
Definition linear_interpolator_1d.hh:171
LinearInterpolator1D(const Coordinates &coordinates)
Construct a LinearInterpolator1D with internal, zeroed data and a coordinate system.
Definition linear_interpolator_1d.hh:32
KOKKOS_FUNCTION LinearInterpolator1D(const LinearInterpolator1D &other)
Copy constructor for LinearInterpolator1D. This is ONLY for usage inside Kokkos parallel loops.
Definition linear_interpolator_1d.hh:46
typename Coordinates::ctype ctype
Definition linear_interpolator_1d.hh:22
typename ViewType::host_mirror_type HostViewType
Definition linear_interpolator_1d.hh:169
const Coordinates coordinates
Definition linear_interpolator_1d.hh:165
bool owns_other_instance
Definition linear_interpolator_1d.hh:175
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