Documentation
|
|
The C interface for diff. More...
Device pointer interface: Difference along a dimension | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| afError | af_diff_S (float *d_out, unsigned ndims_in, const unsigned *dims_in, const float *d_in, int order, int dim) | ||||||||||||||||||||||||
| Single precision, difference function. More... | |||||||||||||||||||||||||
| afError | af_diff_D (double *d_out, unsigned ndims_in, const unsigned *dims_in, const double *d_in, int order, int dim) | ||||||||||||||||||||||||
| Double precision difference function. More... | |||||||||||||||||||||||||
The C interface for diff.
The difference functions compute either the first or second order difference between adjacent elements in an array along a given dimension.
diff1 computes the first order difference (basic adjacent difference) along a given dimension. If the input array has N elements in the dimension of interest, the resulting array has N-1 elements along the given dimension.
diff2 computes the second order difference (i.e. the difference between the adjacent first order differences) along a given dimension.
| afError af_diff_S | ( | float * | d_out, |
| unsigned | ndims_in, | ||
| const unsigned * | dims_in, | ||
| const float * | d_in, | ||
| int | order, | ||
| int | dim | ||
| ) |
Single precision, difference function.
| afError af_diff_D | ( | double * | d_out, |
| unsigned | ndims_in, | ||
| const unsigned * | dims_in, | ||
| const double * | d_in, | ||
| int | order, | ||
| int | dim | ||
| ) |
Double precision difference function.