|
DiFfRG
|
A linear interpolator for 1D data, using texture memory on the GPU and floating point arithmetic on the CPU. More...
#include <tex_linear_interpolation_1D.hh>
Public Types | |
| using | ReturnType = typename internal::__TLITypes<NT>::ReturnType |
Public Member Functions | |
| TexLinearInterpolator1D (const std::vector< NT > &data, const Coordinates &coordinates) | |
| Construct a TexLinearInterpolator1D object from a vector of data and a coordinate system. | |
| TexLinearInterpolator1D (const NT *data, const Coordinates &coordinates) | |
| Construct a TexLinearInterpolator1D object from a pointer to data and a coordinate system. | |
| TexLinearInterpolator1D (const Coordinates &coordinates) | |
| Construct a TexLinearInterpolator1D with internal, zeroed data and a coordinate system. | |
| TexLinearInterpolator1D (const TexLinearInterpolator1D &other) | |
| Construct a copy of a TexLinearInterpolator1D object. | |
| ~TexLinearInterpolator1D () | |
| 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 |
| 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 Coordinates | coordinates |
| std::shared_ptr< float[]> | m_data |
| std::vector< cudaArray_t > | device_array |
| cudaTextureObject_t | texture [max_device_count] |
| std::shared_ptr< float[]> | m_data_AD |
| std::vector< cudaArray_t > | device_array_AD |
| cudaTextureObject_t | texture_AD [max_device_count] |
| const bool | owner |
| int | n_devices |
Static Private Attributes | |
| static constexpr int | max_device_count = 4 |
A linear interpolator for 1D 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::TexLinearInterpolator1D< NT, Coordinates >::ReturnType = typename internal::__TLITypes<NT>::ReturnType |
| DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::TexLinearInterpolator1D | ( | const std::vector< NT > & | data, |
| const Coordinates & | coordinates ) |
Construct a TexLinearInterpolator1D object from a vector of data and a coordinate system.
| data | vector containing the data |
| coordinates | coordinate system of the data |
| DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::TexLinearInterpolator1D | ( | const NT * | data, |
| const Coordinates & | coordinates ) |
Construct a TexLinearInterpolator1D object from a pointer to data and a coordinate system.
| data | pointer to the data |
| coordinates | coordinate system of the data |
| DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::TexLinearInterpolator1D | ( | const Coordinates & | coordinates | ) |
Construct a TexLinearInterpolator1D with internal, zeroed data and a coordinate system.
| coordinates | coordinate system of the data |
| DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::TexLinearInterpolator1D | ( | const TexLinearInterpolator1D< NT, Coordinates > & | other | ) |
Construct a copy of a TexLinearInterpolator1D object.
| other | the object to copy |
| DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::~TexLinearInterpolator1D | ( | ) |
| float * DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::data | ( | ) | const |
| float * DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::data_AD | ( | ) | const |
|
inline |
Get the coordinate system of the data.
|
inline |
Interpolate the data at a given point.
| x | the point at which to interpolate |
| ReturnType & DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::operator[] | ( | const uint | i | ) |
| const ReturnType & DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::operator[] | ( | const uint | i | ) | const |
| void DiFfRG::TexLinearInterpolator1D< NT, Coordinates >::update | ( | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
private |
|
private |