DiFfRG
|
A linear interpolator for 3D data, using texture memory on the GPU and floating point arithmetic on the CPU. More...
#include <tex_linear_interpolation_3D.hh>
Public Types | |
using | ReturnType = typename internal::__TLITypes<NT>::ReturnType |
Public Member Functions | |
TexLinearInterpolator3D (const std::vector< NT > &data, const Coordinates &coordinates) | |
Construct a TexLinearInterpolator3D object from a vector of data and a coordinate system. | |
TexLinearInterpolator3D (const NT *data, const Coordinates &coordinates) | |
Construct a TexLinearInterpolator3D object from a pointer to data and a coordinate system. | |
TexLinearInterpolator3D (const Coordinates &coordinates) | |
Construct a TexLinearInterpolator3D with internal, zeroed data and a coordinate system. | |
TexLinearInterpolator3D (const TexLinearInterpolator3D &other) | |
Construct a copy of a TexLinearInterpolator3D object. | |
~TexLinearInterpolator3D () | |
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 float z) 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, 3 > | 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 3D 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::TexLinearInterpolator3D< NT, Coordinates >::ReturnType = typename internal::__TLITypes<NT>::ReturnType |
DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::TexLinearInterpolator3D | ( | const std::vector< NT > & | data, |
const Coordinates & | coordinates ) |
Construct a TexLinearInterpolator3D object from a vector of data and a coordinate system.
data | vector containing the data |
coordinates | coordinate system of the data |
DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::TexLinearInterpolator3D | ( | const NT * | data, |
const Coordinates & | coordinates ) |
Construct a TexLinearInterpolator3D object from a pointer to data and a coordinate system.
data | pointer to the data |
coordinates | coordinate system of the data |
DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::TexLinearInterpolator3D | ( | const Coordinates & | coordinates | ) |
Construct a TexLinearInterpolator3D with internal, zeroed data and a coordinate system.
coordinates | coordinate system of the data |
DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::TexLinearInterpolator3D | ( | const TexLinearInterpolator3D< NT, Coordinates > & | other | ) |
Construct a copy of a TexLinearInterpolator3D object.
other | the object to copy |
DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::~TexLinearInterpolator3D | ( | ) |
float * DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::data | ( | ) | const |
float * DiFfRG::TexLinearInterpolator3D< 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 |
z | z-coordinate of the point |
ReturnType & DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::operator[] | ( | const uint | i | ) |
const ReturnType & DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::operator[] | ( | const uint | i | ) | const |
void DiFfRG::TexLinearInterpolator3D< NT, Coordinates >::update | ( | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |