LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace > Class Template Reference#
|
DiFfRG
|
Public Types |
Public Member Functions |
Static Public Attributes |
Private Types |
Private Attributes |
Friends |
List of all members
DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace > Class Template Reference
A linear interpolator for 1D data, both on GPU and CPU. More...
#include <linear_interpolator_1d.hh>
Public Types | |
| using | memory_space = DefaultMemorySpace |
| using | other_memory_space = other_memory_space_t<DefaultMemorySpace> |
| using | ctype = typename Coordinates::ctype |
| using | value_type = NT |
Public Member Functions | |
| LinearInterpolator1D (const Coordinates &coordinates) | |
| Construct a LinearInterpolator1D with internal, zeroed data and a coordinate system. | |
| KOKKOS_FUNCTION | LinearInterpolator1D (const LinearInterpolator1D &other) |
| Copy constructor for LinearInterpolator1D. This is ONLY for usage inside Kokkos parallel loops. | |
| KOKKOS_FUNCTION | ~LinearInterpolator1D () |
| template<typename NT2 > | |
| void | update (const NT2 *in_data) |
| template<typename View > requires Kokkos::is_view<View>::value | |
| void | update (const View &view) |
| NT | operator[] (size_t i) const |
| NT KOKKOS_FUNCTION | operator() (const typename Coordinates::ctype x) const |
| Interpolate the data at a given point. | |
| const Coordinates & | get_coordinates () const |
| Get the coordinate system of the data. | |
| auto & | CPU () const |
| auto & | GPU () const |
| template<typename MemorySpace > | |
| auto & | get_on () const |
| NT * | data () |
Static Public Attributes | |
| static constexpr size_t | dim = 1 |
Private Types | |
| using | ViewType = Kokkos::View<NT *, DefaultMemorySpace, Kokkos::MemoryTraits<Kokkos::RandomAccess>> |
| using | HostViewType = typename ViewType::host_mirror_type |
Private Attributes | |
| const Coordinates | coordinates |
| const size_t | size |
| ViewType | device_data |
| HostViewType | host_data |
| LinearInterpolator1D< NT, Coordinates, other_memory_space > * | other_instance = nullptr |
| bool | owns_other_instance = false |
Friends | |
| class | LinearInterpolator1D< NT, Coordinates, other_memory_space > |
Detailed Description
template<typename NT, typename Coordinates, typename DefaultMemorySpace = CPU_memory>
class DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace >
class DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace >
A linear interpolator for 1D data, both on GPU and CPU.
- Template Parameters
-
NT input data type Coordinates coordinate system of the input data
Member Typedef Documentation
◆ ctype
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
| using DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace >::ctype = typename Coordinates::ctype |
◆ HostViewType
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
private |
◆ memory_space
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
| using DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace >::memory_space = DefaultMemorySpace |
◆ other_memory_space
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
| using DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace >::other_memory_space = other_memory_space_t<DefaultMemorySpace> |
◆ value_type
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
| using DiFfRG::LinearInterpolator1D< NT, Coordinates, DefaultMemorySpace >::value_type = NT |
◆ ViewType
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
private |
Constructor & Destructor Documentation
◆ LinearInterpolator1D() [1/2]
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
Construct a LinearInterpolator1D with internal, zeroed data and a coordinate system.
- Parameters
-
size size of the internal data coordinates coordinate system of the data
◆ LinearInterpolator1D() [2/2]
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
Copy constructor for LinearInterpolator1D. This is ONLY for usage inside Kokkos parallel loops.
◆ ~LinearInterpolator1D()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
Member Function Documentation
◆ CPU()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
◆ data()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
◆ get_coordinates()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
Get the coordinate system of the data.
- Returns
- const Coordinates& the coordinate system
◆ get_on()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
template<typename MemorySpace >
|
inline |
◆ GPU()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
◆ operator()()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
Interpolate the data at a given point.
- Parameters
-
x the point at which to interpolate
- Returns
- NT the interpolated value
◆ operator[]()
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
inline |
◆ update() [1/2]
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
template<typename NT2 >
|
inline |
◆ update() [2/2]
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
template<typename View >
requires Kokkos::is_view<View>::value
requires Kokkos::is_view<View>::value
|
inline |
Friends And Related Symbol Documentation
◆ LinearInterpolator1D< NT, Coordinates, other_memory_space >
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
friend |
Member Data Documentation
◆ coordinates
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
private |
◆ device_data
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
private |
◆ dim
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
staticconstexpr |
◆ host_data
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
private |
◆ other_instance
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
mutableprivate |
◆ owns_other_instance
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
mutableprivate |
◆ size
template<typename NT , typename Coordinates , typename DefaultMemorySpace = CPU_memory>
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/interpolation/linear_interpolator_1d.hh
Generated by