|
DiFfRG
|
A linear interpolator for 2D data, both on GPU and CPU. More...
#include <linear_interpolation_2D.hh>
Public Member Functions | |
| LinearInterpolator2D (const std::vector< NT > &data, const Coordinates &coordinates) | |
| Construct a LinearInterpolator2D object from a vector of data and a coordinate system. | |
| LinearInterpolator2D (const NT *data, const Coordinates &coordinates) | |
| Construct a LinearInterpolator2D object from a pointer to data and a coordinate system. | |
| LinearInterpolator2D (const Coordinates &coordinates) | |
| Construct a LinearInterpolator2D with internal, zeroed data and a coordinate system. | |
| LinearInterpolator2D (const LinearInterpolator2D &other) | |
| Construct a copy of a LinearInterpolator2D object. | |
| template<typename NT2 > | |
| void | update (const NT2 *data) |
| void | update () |
| NT * | data () const |
| __device__ __host__ NT | operator() (const typename Coordinates::ctype x, const typename Coordinates::ctype y) const |
| Interpolate the data at a given point. | |
| NT & | operator[] (const uint i) |
| const NT & | operator[] (const uint i) const |
| const Coordinates & | get_coordinates () const |
| Get the coordinate system of the data. | |
Private Attributes | |
| const uint | size |
| const std::array< uint, 2 > | shape |
| const Coordinates | coordinates |
| std::shared_ptr< NT[]> | m_data |
| std::shared_ptr< thrust::device_vector< NT > > | device_data |
| const NT * | device_data_ptr |
| const bool | owner |
A linear interpolator for 2D data, both on GPU and CPU.
| NT | input data type |
| Coordinates | coordinate system of the input data |
| DiFfRG::LinearInterpolator2D< NT, Coordinates >::LinearInterpolator2D | ( | const std::vector< NT > & | data, |
| const Coordinates & | coordinates ) |
Construct a LinearInterpolator2D object from a vector of data and a coordinate system.
| data | vector containing the data |
| coordinates | coordinate system of the data |
| DiFfRG::LinearInterpolator2D< NT, Coordinates >::LinearInterpolator2D | ( | const NT * | data, |
| const Coordinates & | coordinates ) |
Construct a LinearInterpolator2D object from a pointer to data and a coordinate system.
| data | pointer to the data |
| size | size of the data |
| coordinates | coordinate system of the data |
| DiFfRG::LinearInterpolator2D< NT, Coordinates >::LinearInterpolator2D | ( | const Coordinates & | coordinates | ) |
Construct a LinearInterpolator2D with internal, zeroed data and a coordinate system.
| size | size of the internal data |
| coordinates | coordinate system of the data |
| DiFfRG::LinearInterpolator2D< NT, Coordinates >::LinearInterpolator2D | ( | const LinearInterpolator2D< NT, Coordinates > & | other | ) |
Construct a copy of a LinearInterpolator2D object.
| other | the object to copy |
| NT * DiFfRG::LinearInterpolator2D< NT, Coordinates >::data | ( | ) | const |
|
inline |
Get the coordinate system of the data.
|
inline |
Interpolate the data at a given point.
| x | the point at which to interpolate |
| NT & DiFfRG::LinearInterpolator2D< NT, Coordinates >::operator[] | ( | const uint | i | ) |
| const NT & DiFfRG::LinearInterpolator2D< NT, Coordinates >::operator[] | ( | const uint | i | ) | const |
| void DiFfRG::LinearInterpolator2D< NT, Coordinates >::update | ( | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |