C interface for Interpolation.
More...
|
Vector (1D) interpolation.
- Parameters
-
| [out] | d_YI | Interpolated function values |
| [in] | n | Number of elements in inputs d_Y |
| [in] | d_Y | Function values |
| [in] | batch_Y | Number of tiles of d_Y |
| [in] | ni | Number of elements in d_XI |
| [in] | d_XI | Grid values to interpolate at |
| [in] | batch_XI | Number of tiles of d_XI |
| [in] | method | interpolation type ('N' nearest, 'L' linear, 'C' cubic) |
| [in] | offgrid | Value for interpolations off the grid (i.e. out-of-bounds) |
|
| afError | af_approx1_S (float *d_YI, unsigned n, const float *d_Y, unsigned batch_Y, unsigned ni, const float *d_XI, unsigned batch_XI, char method, float offgrid) |
| |
| afError | af_approx1_D (double *d_YI, unsigned n, const double *d_Y, unsigned batch_Y, unsigned ni, const double *d_XI, unsigned batch_XI, char method, float offgrid) |
| |
| afError | af_approx1_C (cfloat *d_YI, unsigned n, const cfloat *d_Y, unsigned batch_Y, unsigned ni, const float *d_XI, unsigned batch_XI, char method, float offgrid) |
| |
| afError | af_approx1_Z (cdouble *d_YI, unsigned n, const cdouble *d_Y, unsigned batch_Y, unsigned ni, const double *d_XI, unsigned batch_XI, char method, float offgrid) |
| |
|
Matrix (2D) interpolation.
- Parameters
-
| [out] | d_ZI | Interpolated function values |
| [in] | nx | Number of rows in d_Z |
| [in] | ny | Number of columns in d_Z |
| [in] | d_Z | Function values |
| [in] | batch_Z | Number of tiles of d_Z |
| [in] | ni | Number of elements in d_XI, d_YI |
| [in] | d_XI | X Grid or Vector values to interpolate at |
| [in] | batch_XI | Number of tiles of d_XI |
| [in] | d_YI | Y Grid or Vector values to interpolate at |
| [in] | batch_YI | Number of tiles of d_YI |
| [in] | method | interpolation type ('N' nearest, 'L' linear, 'C' cubic) |
| [in] | offgrid | Value for interpolations off the grid (i.e. out-of-bounds) |
|
| afError | af_approx2_S (float *d_ZI, unsigned nx, unsigned ny, const float *d_Z, unsigned batch_Z, unsigned ni, const float *d_XI, unsigned batch_XI, const float *d_YI, unsigned batch_YI, char method, float offgrid) |
| |
| afError | af_approx2_D (double *d_ZI, unsigned nx, unsigned ny, const double *d_Z, unsigned batch_Z, unsigned ni, const double *d_XI, unsigned batch_XI, const double *d_YI, unsigned batch_YI, char method, float offgrid) |
| |
| afError | af_approx2_C (cfloat *d_ZI, unsigned nx, unsigned ny, const cfloat *d_Z, unsigned batch_Z, unsigned ni, const float *d_XI, unsigned batch_XI, const float *d_YI, unsigned batch_YI, char method, float offgrid) |
| |
| afError | af_approx2_Z (cdouble *d_ZI, unsigned nx, unsigned ny, const cdouble *d_Z, unsigned batch_Z, unsigned ni, const double *d_XI, unsigned batch_XI, const double *d_YI, unsigned batch_YI, char method, float offgrid) |
| |
C interface for Interpolation.
approx1 and approx2 perform interpolation on data in one and two dimensions, respectively. These methods have three options for the type of interpolation to perform—nearest neighbor, linear interpolation, and cubic interpolation.
1D Example:
float h_Y[] = {0,1,2,3,4,5,6};
array Y = array(7,h_Y);
float h_Xi[] = {1.2, 1.4, 1.6, 4, 700};
array Xi = array(5,h_Xi);
Xi,
'L');
2D Example:
float h_data[] = { 0.00,
0.10,
0.20,
0.01,
0.11,
0.21
};
float h_Xirange[] = {1.2, 1.4, 1.6};
float h_Yirange[] = {0.3, 0.4, 0.6, 0.7};
array data = array(3,2, h_data);
array Xi =
tile(array(3, 1, h_Xirange), 1, 4);
array Yi =
tile(array(1, 4, h_Yirange), 3, 1);
Xi, Yi,
'L');
| afError af_approx1_S |
( |
float * |
d_YI, |
|
|
unsigned |
n, |
|
|
const float * |
d_Y, |
|
|
unsigned |
batch_Y, |
|
|
unsigned |
ni, |
|
|
const float * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx1_D |
( |
double * |
d_YI, |
|
|
unsigned |
n, |
|
|
const double * |
d_Y, |
|
|
unsigned |
batch_Y, |
|
|
unsigned |
ni, |
|
|
const double * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx1_C |
( |
cfloat * |
d_YI, |
|
|
unsigned |
n, |
|
|
const cfloat * |
d_Y, |
|
|
unsigned |
batch_Y, |
|
|
unsigned |
ni, |
|
|
const float * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx1_Z |
( |
cdouble * |
d_YI, |
|
|
unsigned |
n, |
|
|
const cdouble * |
d_Y, |
|
|
unsigned |
batch_Y, |
|
|
unsigned |
ni, |
|
|
const double * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx2_S |
( |
float * |
d_ZI, |
|
|
unsigned |
nx, |
|
|
unsigned |
ny, |
|
|
const float * |
d_Z, |
|
|
unsigned |
batch_Z, |
|
|
unsigned |
ni, |
|
|
const float * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
const float * |
d_YI, |
|
|
unsigned |
batch_YI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx2_D |
( |
double * |
d_ZI, |
|
|
unsigned |
nx, |
|
|
unsigned |
ny, |
|
|
const double * |
d_Z, |
|
|
unsigned |
batch_Z, |
|
|
unsigned |
ni, |
|
|
const double * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
const double * |
d_YI, |
|
|
unsigned |
batch_YI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx2_C |
( |
cfloat * |
d_ZI, |
|
|
unsigned |
nx, |
|
|
unsigned |
ny, |
|
|
const cfloat * |
d_Z, |
|
|
unsigned |
batch_Z, |
|
|
unsigned |
ni, |
|
|
const float * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
const float * |
d_YI, |
|
|
unsigned |
batch_YI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |
| afError af_approx2_Z |
( |
cdouble * |
d_ZI, |
|
|
unsigned |
nx, |
|
|
unsigned |
ny, |
|
|
const cdouble * |
d_Z, |
|
|
unsigned |
batch_Z, |
|
|
unsigned |
ni, |
|
|
const double * |
d_XI, |
|
|
unsigned |
batch_XI, |
|
|
const double * |
d_YI, |
|
|
unsigned |
batch_YI, |
|
|
char |
method, |
|
|
float |
offgrid |
|
) |
| |