|
DiFfRG
|
A linear interpolator for 2D data, using texture memory on the GPU and floating point arithmetic on the CPU. More...
#include <tex_linear_interpolation_2D.hh>
Public Types | |
| using | ReturnType = typename internal::__TLITypes<NT>::ReturnType |
Public Member Functions | |
| TexLinearInterpolator2D (const std::vector< NT > &data, const Coordinates &coordinates) | |
| Construct a TexLinearInterpolator2D object from a vector of data and a coordinate system. | |
| TexLinearInterpolator2D (const NT *data, const Coordinates &coordinates) | |
| Construct a TexLinearInterpolator2D object from a pointer to data and a coordinate system. | |
| TexLinearInterpolator2D (const Coordinates &coordinates) | |
| Construct a TexLinearInterpolator2D with internal, zeroed data and a coordinate system. | |
| TexLinearInterpolator2D (const TexLinearInterpolator2D &other) | |
| Construct a copy of a TexLinearInterpolator2D object. | |
| ~TexLinearInterpolator2D () | |
| template<typename NT2 > | |
| void | update (const NT2 *data) |
| void | update () |
| float * | data () const |
| float * | data_AD () const |
| __device__ __host__ ReturnType | operator() (const float x, const float y) const |
| Interpolate the data at a given point. | |
| ReturnType & | operator[] (const uint i) |
| const ReturnType & | 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< float[]> | m_data |
| cudaArray_t | device_array |
| cudaTextureObject_t | texture |
| std::shared_ptr< float[]> | m_data_AD |
| cudaArray_t | device_array_AD |
| cudaTextureObject_t | texture_AD |
| const bool | owner |
A linear interpolator for 2D data, using texture memory on the GPU and floating point arithmetic on the CPU.
| NT | input data type |
| Coordinates | coordinate system of the input data |
| using DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::ReturnType = typename internal::__TLITypes<NT>::ReturnType |
| DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::TexLinearInterpolator2D | ( | const std::vector< NT > & | data, |
| const Coordinates & | coordinates ) |
Construct a TexLinearInterpolator2D object from a vector of data and a coordinate system.
| data | vector containing the data |
| coordinates | coordinate system of the data |
| DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::TexLinearInterpolator2D | ( | const NT * | data, |
| const Coordinates & | coordinates ) |
Construct a TexLinearInterpolator2D object from a pointer to data and a coordinate system.
| data | pointer to the data |
| coordinates | coordinate system of the data |
| DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::TexLinearInterpolator2D | ( | const Coordinates & | coordinates | ) |
Construct a TexLinearInterpolator2D with internal, zeroed data and a coordinate system.
| coordinates | coordinate system of the data |
| DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::TexLinearInterpolator2D | ( | const TexLinearInterpolator2D< NT, Coordinates > & | other | ) |
Construct a copy of a TexLinearInterpolator2D object.
| other | the object to copy |
| DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::~TexLinearInterpolator2D | ( | ) |
| float * DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::data | ( | ) | const |
| float * DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::data_AD | ( | ) | const |
|
inline |
Get the coordinate system of the data.
|
inline |
Interpolate the data at a given point.
| x | x-coordinate of the point |
| y | y-coordinate of the point |
| ReturnType & DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::operator[] | ( | const uint | i | ) |
| const ReturnType & DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::operator[] | ( | const uint | i | ) | const |
| void DiFfRG::TexLinearInterpolator2D< NT, Coordinates >::update | ( | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |