Documentation
|
|
C interface for Convolution. More...
| afError | af_conv_SS (float *d_out, unsigned ni, const float *d_in, unsigned batchi, unsigned nf, const float *d_filt, unsigned batchf, bool expand) |
| Single precision, real input, real filter, one dimensional convolution. More... | |
| afError | af_conv_CS (cfloat *d_out, unsigned ni, const cfloat *d_in, unsigned batchi, unsigned nf, const float *d_filt, unsigned batchf, bool expand) |
| Single precision, complex input, real filter, one dimensional convolution. More... | |
| afError | af_conv_CC (cfloat *d_out, unsigned ni, const cfloat *d_in, unsigned batchi, unsigned nf, const cfloat *d_filt, unsigned batchf, bool expand) |
| Float precision, complex input, complex filter, one dimensional convolution. More... | |
| afError | af_conv_DD (double *d_out, unsigned ni, const double *d_in, unsigned batchi, unsigned nf, const double *d_filt, unsigned batchf, bool expand) |
| Single precision, real input, real filter, one dimensional convolution. More... | |
| afError | af_conv_ZD (cdouble *d_out, unsigned ni, const cdouble *d_in, unsigned batchi, unsigned nf, const double *d_filt, unsigned batchf, bool expand) |
| Double precision, complex input, real filter, one dimensional convolution. More... | |
| afError | af_conv_ZZ (cdouble *d_out, unsigned ni, const cdouble *d_in, unsigned batchi, unsigned nf, const cdouble *d_filt, unsigned batchf, bool expand) |
| Double precision, complex input, complex filter, one dimensional convolution. More... | |
| afError | af_conv2_SS (float *d_out, unsigned mi, unsigned ni, const float *d_in, unsigned batch_in, unsigned mf, unsigned nf, const float *d_filt, unsigned batch_filt, bool expand) |
| afError | af_conv2_CS (cfloat *d_out, unsigned mi, unsigned ni, const cfloat *d_in, unsigned batch_in, unsigned mf, unsigned nf, const float *d_filt, unsigned batch_filt, bool expand) |
| Single precision, complex input, real filter, two dimensional convolution. More... | |
| afError | af_conv2_CC (cfloat *d_out, unsigned mi, unsigned ni, const cfloat *d_in, unsigned batch_in, unsigned mf, unsigned nf, const cfloat *d_filt, unsigned batch_filt, bool expand) |
| Single precision, complex input, complex filter, two dimensional convolution. More... | |
| afError | af_conv2_DD (double *d_out, unsigned mi, unsigned ni, const double *d_in, unsigned batch_in, unsigned mf, unsigned nf, const double *d_filt, unsigned batch_filt, bool expand) |
| Double precision, real input, real filter, two dimensional convolution. More... | |
| afError | af_conv2_ZD (cdouble *d_out, unsigned mi, unsigned ni, const cdouble *d_in, unsigned batch_in, unsigned mf, unsigned nf, const double *d_filt, unsigned batch_filt, bool expand) |
| Double precision, complex input, real filter, two dimensional convolution. More... | |
| afError | af_conv2_ZZ (cdouble *d_out, unsigned mi, unsigned ni, const cdouble *d_in, unsigned batch_in, unsigned mf, unsigned nf, const cdouble *d_filt, unsigned batch_filt, bool expand) |
| Double precision, complex input, complex filter, two dimensional convolution. More... | |
| afError | af_convn_SS (float *d_out, unsigned ndimsi, unsigned *dimsi, const float *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const float *d_filt, unsigned batchf, bool expand) |
| Single precision, real input, real filter, multi-dimensional convolution. More... | |
| afError | af_convn_CS (cfloat *d_out, unsigned ndimsi, unsigned *dimsi, const cfloat *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const float *d_filt, unsigned batchf, bool expand) |
| Single precision, complex input, real filter, multi-dimensional convolution. More... | |
| afError | af_convn_CC (cfloat *d_out, unsigned ndimsi, unsigned *dimsi, const cfloat *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const cfloat *d_filt, unsigned batchf, bool expand) |
| Single precision, complex input, complex filter, multi-dimensional convolution. More... | |
| afError | af_convn_DD (double *d_out, unsigned ndimsi, unsigned *dimsi, const double *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const double *d_filt, unsigned batchf, bool expand) |
| Double precision, real input, real filter, multi-dimensional convolution. More... | |
| afError | af_convn_ZD (cdouble *d_out, unsigned ndimsi, unsigned *dimsi, const cdouble *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const double *d_filt, unsigned batchf, bool expand) |
| Double precision, complex input, real filter, multi-dimensional convolution. More... | |
| afError | af_convn_ZZ (cdouble *d_out, unsigned ndimsi, unsigned *dimsi, const cdouble *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const cdouble *d_filt, unsigned batchf, bool expand) |
| Double precision, complex input, complex filter, multi-dimensional convolution. More... | |
Device pointer interface: filter is host pointer | |||||||||||||||||||||||||||||||
Multi-dimensional convolution (filter on host)
| |||||||||||||||||||||||||||||||
| afError | af_convh_SS (float *d_out, unsigned ndimsi, unsigned *dimsi, const float *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const float *h_filt, unsigned batchf, bool expand) | ||||||||||||||||||||||||||||||
| Single precision, real input, real filter, multi-dimensional convolution. More... | |||||||||||||||||||||||||||||||
| afError | af_convh_CS (cfloat *d_out, unsigned ndimsi, unsigned *dimsi, const cfloat *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const float *h_filt, unsigned batchf, bool expand) | ||||||||||||||||||||||||||||||
| Single precision, complex input, real filter, multi-dimensional convolution. More... | |||||||||||||||||||||||||||||||
| afError | af_convh_DD (double *d_out, unsigned ndimsi, unsigned *dimsi, const double *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const double *h_filt, unsigned batchf, bool expand) | ||||||||||||||||||||||||||||||
| Double precision, real input, real filter, multi-dimensional convolution. More... | |||||||||||||||||||||||||||||||
| afError | af_convh_ZD (cdouble *d_out, unsigned ndimsi, unsigned *dimsi, const cdouble *d_in, unsigned batchi, unsigned ndimsf, unsigned *dimsf, const double *h_filt, unsigned batchf, bool expand) | ||||||||||||||||||||||||||||||
| Double precision, complex input, real filter, multi-dimensional convolution. More... | |||||||||||||||||||||||||||||||
C interface for Convolution.
A convolution is a common operation between a source array, a, and a filter (or kernel) array b. The answer to the convolution is the same as computing the coefficients in polynomial multiplication, if a and b are the coefficients.
Another way to think about it is that the filter kernel is centered on each pixel in a, and the output for that pixel or data point is the sum of the products.
Consider the following example with the calculation for the first few points shown as a comment:
Note that pixels that are outside an image or data points that are outside the domain of a signal are treated as zero.
| afError af_conv_SS | ( | float * | d_out, |
| unsigned | ni, | ||
| const float * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | nf, | ||
| const float * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, real input, real filter, one dimensional convolution.
| [out] | d_out | The convolved output |
| [in] | ni | Size of input signal |
| [in] | d_in | Input signal |
| [in] | batchi | Number of input signal tiles |
| [in] | nf | Size of input filter |
| [in] | d_filt | Input filter |
| [in] | batchf | Number of input signal tiles |
| [in] | expand | perform expanded convolution if true. |
| afError af_conv_CS | ( | cfloat * | d_out, |
| unsigned | ni, | ||
| const cfloat * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | nf, | ||
| const float * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, complex input, real filter, one dimensional convolution.
| afError af_conv_CC | ( | cfloat * | d_out, |
| unsigned | ni, | ||
| const cfloat * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | nf, | ||
| const cfloat * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Float precision, complex input, complex filter, one dimensional convolution.
| afError af_conv_DD | ( | double * | d_out, |
| unsigned | ni, | ||
| const double * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | nf, | ||
| const double * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, real input, real filter, one dimensional convolution.
| afError af_conv_ZD | ( | cdouble * | d_out, |
| unsigned | ni, | ||
| const cdouble * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | nf, | ||
| const double * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Double precision, complex input, real filter, one dimensional convolution.
| afError af_conv_ZZ | ( | cdouble * | d_out, |
| unsigned | ni, | ||
| const cdouble * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | nf, | ||
| const cdouble * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Double precision, complex input, complex filter, one dimensional convolution.
| afError af_conv2_SS | ( | float * | d_out, |
| unsigned | mi, | ||
| unsigned | ni, | ||
| const float * | d_in, | ||
| unsigned | batch_in, | ||
| unsigned | mf, | ||
| unsigned | nf, | ||
| const float * | d_filt, | ||
| unsigned | batch_filt, | ||
| bool | expand | ||
| ) |
| [out] | d_out | The convolved output |
| [in] | mi | Rows in input signal |
| [in] | ni | Columns in input signal |
| [in] | d_in | Input signal |
| [in] | batch_in | Number of input signal tiles |
| [in] | mf | Rows in the input filter |
| [in] | nf | Columns in the input filter |
| [in] | d_filt | Input filter |
| [in] | batch_filt | Number of input signal tiles |
| [in] | expand | perform expanded convolution if true.Single precision, real input, real filter, two dimensional convolution |
| afError af_conv2_CS | ( | cfloat * | d_out, |
| unsigned | mi, | ||
| unsigned | ni, | ||
| const cfloat * | d_in, | ||
| unsigned | batch_in, | ||
| unsigned | mf, | ||
| unsigned | nf, | ||
| const float * | d_filt, | ||
| unsigned | batch_filt, | ||
| bool | expand | ||
| ) |
Single precision, complex input, real filter, two dimensional convolution.
| afError af_conv2_CC | ( | cfloat * | d_out, |
| unsigned | mi, | ||
| unsigned | ni, | ||
| const cfloat * | d_in, | ||
| unsigned | batch_in, | ||
| unsigned | mf, | ||
| unsigned | nf, | ||
| const cfloat * | d_filt, | ||
| unsigned | batch_filt, | ||
| bool | expand | ||
| ) |
Single precision, complex input, complex filter, two dimensional convolution.
| afError af_conv2_DD | ( | double * | d_out, |
| unsigned | mi, | ||
| unsigned | ni, | ||
| const double * | d_in, | ||
| unsigned | batch_in, | ||
| unsigned | mf, | ||
| unsigned | nf, | ||
| const double * | d_filt, | ||
| unsigned | batch_filt, | ||
| bool | expand | ||
| ) |
Double precision, real input, real filter, two dimensional convolution.
| afError af_conv2_ZD | ( | cdouble * | d_out, |
| unsigned | mi, | ||
| unsigned | ni, | ||
| const cdouble * | d_in, | ||
| unsigned | batch_in, | ||
| unsigned | mf, | ||
| unsigned | nf, | ||
| const double * | d_filt, | ||
| unsigned | batch_filt, | ||
| bool | expand | ||
| ) |
Double precision, complex input, real filter, two dimensional convolution.
| afError af_conv2_ZZ | ( | cdouble * | d_out, |
| unsigned | mi, | ||
| unsigned | ni, | ||
| const cdouble * | d_in, | ||
| unsigned | batch_in, | ||
| unsigned | mf, | ||
| unsigned | nf, | ||
| const cdouble * | d_filt, | ||
| unsigned | batch_filt, | ||
| bool | expand | ||
| ) |
Double precision, complex input, complex filter, two dimensional convolution.
| afError af_convn_SS | ( | float * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const float * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const float * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, real input, real filter, multi-dimensional convolution.
| [out] | d_out | The convolved output |
| [in] | ndimsi | Number of dimensions in input signal |
| [in] | dimsi | Dimensions of input signal |
| [in] | d_in | Input signal |
| [in] | batchi | Number of input signal tiles |
| [in] | ndimsf | Number of dimensions in input filter |
| [in] | dimsf | Dimensions of input filter |
| [in] | d_filt | Input filter |
| [in] | batchf | Number of input signal tiles |
| [in] | expand | perform expanded convolution if true. |
| afError af_convn_CS | ( | cfloat * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const cfloat * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const float * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, complex input, real filter, multi-dimensional convolution.
| afError af_convn_CC | ( | cfloat * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const cfloat * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const cfloat * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, complex input, complex filter, multi-dimensional convolution.
| afError af_convn_DD | ( | double * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const double * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const double * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Double precision, real input, real filter, multi-dimensional convolution.
| afError af_convn_ZD | ( | cdouble * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const cdouble * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const double * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Double precision, complex input, real filter, multi-dimensional convolution.
| afError af_convn_ZZ | ( | cdouble * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const cdouble * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const cdouble * | d_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Double precision, complex input, complex filter, multi-dimensional convolution.
| afError af_convh_SS | ( | float * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const float * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const float * | h_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, real input, real filter, multi-dimensional convolution.
| afError af_convh_CS | ( | cfloat * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const cfloat * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const float * | h_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Single precision, complex input, real filter, multi-dimensional convolution.
| afError af_convh_DD | ( | double * | d_out, |
| unsigned | ndimsi, | ||
| unsigned * | dimsi, | ||
| const double * | d_in, | ||
| unsigned | batchi, | ||
| unsigned | ndimsf, | ||
| unsigned * | dimsf, | ||
| const double * | h_filt, | ||
| unsigned | batchf, | ||
| bool | expand | ||
| ) |
Double precision, real input, real filter, multi-dimensional convolution.