LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace > Class Template Reference#

DiFfRG: DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace > Class Template Reference

A linear interpolator for 2D data, both on GPU and CPU. More...

#include <linear_interpolator_2d.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

 LinearInterpolator2D (const Coordinates &coordinates)
 Construct a LinearInterpolator2D with internal, zeroed data and a coordinate system.
 
KOKKOS_FUNCTION LinearInterpolator2D (const LinearInterpolator2D &other)
 Copy constructor for LinearInterpolator2D. This is ONLY for usage inside Kokkos parallel loops.
 
KOKKOS_FUNCTION ~LinearInterpolator2D ()
 
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 typename Coordinates::ctype y) const
 Interpolate the data at a given point.
 
autoCPU () const
 
autoGPU () const
 
template<typename MemorySpace >
autoget_on () const
 
const Coordinatesget_coordinates () const
 Get the coordinate system of the data.
 
NTdata ()
 

Static Public Attributes

static constexpr size_t dim = 2
 

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 device::array< size_t, 2 > sizes
 
const size_t total_size
 
ViewType device_data
 
HostViewType host_data
 
LinearInterpolator2D< NT, Coordinates, other_memory_space > * other_instance = nullptr
 
bool owns_other_instance = false
 

Friends

class LinearInterpolator2D< NT, Coordinates, other_memory_space >
 

Detailed Description

template<typename NT, typename Coordinates, typename DefaultMemorySpace = CPU_memory>
class DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >

A linear interpolator for 2D data, both on GPU and CPU.

Template Parameters
NTinput data type
Coordinatescoordinate system of the input data

Member Typedef Documentation

◆ ctype

◆ HostViewType

using DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >::HostViewType = typename ViewType::host_mirror_type
private

◆ memory_space

◆ other_memory_space

◆ value_type

◆ ViewType

using DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >::ViewType = Kokkos::View<NT **, DefaultMemorySpace, Kokkos::MemoryTraits<Kokkos::RandomAccess> >
private

Constructor & Destructor Documentation

◆ LinearInterpolator2D() [1/2]

DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >::LinearInterpolator2D ( const Coordinates coordinates)
inline

Construct a LinearInterpolator2D with internal, zeroed data and a coordinate system.

Parameters
sizesize of the internal data
coordinatescoordinate system of the data

◆ LinearInterpolator2D() [2/2]

Copy constructor for LinearInterpolator2D. This is ONLY for usage inside Kokkos parallel loops.

◆ ~LinearInterpolator2D()

Member Function Documentation

◆ CPU()

◆ data()

◆ get_coordinates()

Get the coordinate system of the data.

Returns
const Coordinates& the coordinate system

◆ get_on()

◆ GPU()

◆ operator()()

NT KOKKOS_FUNCTION DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >::operator() ( const typename Coordinates::ctype  x,
const typename Coordinates::ctype  y 
) const
inline

Interpolate the data at a given point.

Parameters
xthe point at which to interpolate
Returns
NT the interpolated value

◆ operator[]()

◆ update() [1/2]

◆ update() [2/2]

template<typename View >
requires Kokkos::is_view<View>
::value void DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >::update ( const View view)
inline

Friends And Related Symbol Documentation

◆ LinearInterpolator2D< NT, Coordinates, other_memory_space >

Member Data Documentation

◆ coordinates

◆ device_data

◆ dim

◆ host_data

◆ other_instance

◆ owns_other_instance

bool DiFfRG::LinearInterpolator2D< NT, Coordinates, DefaultMemorySpace >::owns_other_instance = false
mutableprivate

◆ sizes

◆ total_size


The documentation for this class was generated from the following file: