Documentation
|
|
The C interface for Gradient along a dimension. More...
| afError | af_grad_B (bool *d_dx, bool *d_dy, unsigned nx, unsigned ny, const bool *d_in, unsigned batch) |
| afError | af_grad_U (unsigned *d_dx, unsigned *d_dy, unsigned nx, unsigned ny, const unsigned *d_in, unsigned batch) |
| Unsigned integer gradient function. More... | |
| afError | af_grad_I (int *d_dx, int *d_dy, unsigned nx, unsigned ny, const int *d_in, unsigned batch) |
| Integer gradient function. More... | |
| afError | af_grad_S (float *d_dx, float *d_dy, unsigned nx, unsigned ny, const float *d_in, unsigned batch) |
| Single precision, floating point gradient function. More... | |
| afError | af_grad_D (double *d_dx, double *d_dy, unsigned nx, unsigned ny, const double *d_in, unsigned batch) |
| Double precision, floating point gradient function. More... | |
The C interface for Gradient along a dimension.
grad computes the gradient of a matrix using a central difference along a given dimension. For an interior point in the matrix, \( n_i \), the central difference is computed as \( \frac{n_{i+1} - n_{i-1}}{2} \). For exterior points (those along the edge of the matrix), a one-sided difference is used.
| afError af_grad_B | ( | bool * | d_dx, |
| bool * | d_dy, | ||
| unsigned | nx, | ||
| unsigned | ny, | ||
| const bool * | d_in, | ||
| unsigned | batch | ||
| ) |
| [out] | d_dx | Output gradient along the first dimension |
| [out] | d_dy | Output gradient along the second dimension |
| [in] | nx | Number of elements in the first dimension |
| [in] | ny | Number of elements in the second dimension |
| [in] | d_in | The input the the gradient function |
| [in] | batch | The number of input tiles being handledBoolean gradient function |
| afError af_grad_U | ( | unsigned * | d_dx, |
| unsigned * | d_dy, | ||
| unsigned | nx, | ||
| unsigned | ny, | ||
| const unsigned * | d_in, | ||
| unsigned | batch | ||
| ) |
Unsigned integer gradient function.
| afError af_grad_I | ( | int * | d_dx, |
| int * | d_dy, | ||
| unsigned | nx, | ||
| unsigned | ny, | ||
| const int * | d_in, | ||
| unsigned | batch | ||
| ) |
Integer gradient function.
| afError af_grad_S | ( | float * | d_dx, |
| float * | d_dy, | ||
| unsigned | nx, | ||
| unsigned | ny, | ||
| const float * | d_in, | ||
| unsigned | batch | ||
| ) |
Single precision, floating point gradient function.
| afError af_grad_D | ( | double * | d_dx, |
| double * | d_dy, | ||
| unsigned | nx, | ||
| unsigned | ny, | ||
| const double * | d_in, | ||
| unsigned | batch | ||
| ) |
Double precision, floating point gradient function.