280 AFAPI array
fft(
const array&,
int pad=-1);
292 AFAPI array
fft2(
const array&,
int nx=-1,
int ny=-1);
301 AFAPI array
fft3(
const array&,
const dim4& dims=dim4(0));
315 AFAPI array
ifft(
const array&,
int pad=-1);
328 AFAPI array
ifft2(
const array&,
int nx=-1,
int ny=-1);
338 AFAPI array
ifft3(
const array&,
const dim4& dims=dim4(0));
359 AFAPI array
fir(
int nb,
const float* h_b,
const array& x);
370 AFAPI array
fir(
const array& b,
const array& x);
392 AFAPI array
iir(
int nb,
const float* h_b,
int na,
const float* h_a,
const array& x);
400 AFAPI array
iir(
const array& b,
const array& a,
const array& x);
424 bool expand =
false);
436 template<
typename ty> array
convolve(
unsigned n1,
441 bool expand =
false);
480 template<
typename ty> array
convolve(
const array& signal,
484 bool expand =
false);
558 dim3 dim_I,
const float *d_I,
559 unsigned batch,
int dim,
int direction);
562 dim3 dim_I,
const cfloat *d_I,
563 unsigned batch,
int dim,
int direction);
566 dim3 dim_I,
const double *d_I,
567 unsigned batch,
int dim,
int direction);
570 dim3 dim_I,
const cdouble *d_I,
571 unsigned batch,
int dim,
int direction);
587 unsigned xi,
unsigned yi,
const float *d_I,
588 unsigned batch,
int direction);
591 unsigned xi,
unsigned yi,
593 unsigned batch,
int direction);
596 unsigned xi,
unsigned yi,
const double *d_I,
597 unsigned batch,
int direction);
600 unsigned xi,
unsigned yi,
602 unsigned batch,
int direction);
615 dim3 dims_I,
const float *d_I,
616 unsigned batch,
int direction);
619 dim3 dims_I,
const cfloat *d_I,
620 unsigned batch,
int direction);
623 dim3 dims_I,
const double *d_I,
624 unsigned batch,
int direction);
627 dim3 dims_I,
const cdouble *d_I,
628 unsigned batch,
int direction);
683 unsigned len_in,
const float *d_in,
684 unsigned len_a ,
const float *h_a,
685 unsigned len_b ,
const float *h_b,
686 const float *d_init,
float *d_final,
687 unsigned Nin,
unsigned Ninit);
690 unsigned len_in,
const cfloat *d_in,
691 unsigned len_a ,
const float *h_a,
692 unsigned len_b ,
const float *h_b,
694 unsigned Nin,
unsigned Ninit);
697 unsigned len_in,
const double *d_in,
698 unsigned len_a ,
const double *h_a,
699 unsigned len_b ,
const double *h_b,
700 const double *d_init,
double *d_final,
701 unsigned Nin,
unsigned Ninit);
704 unsigned len_in,
const cdouble *d_in,
705 unsigned len_a ,
const double *h_a,
706 unsigned len_b ,
const double *h_b,
708 unsigned Nin,
unsigned Ninit);
736 unsigned ni,
const float *d_in,
unsigned batchi,
737 unsigned nf,
const float *d_filt,
unsigned batchf,
741 unsigned ni,
const cfloat *d_in,
unsigned batchi,
742 unsigned nf,
const float *d_filt,
unsigned batchf,
746 unsigned ni,
const cfloat *d_in,
unsigned batchi,
747 unsigned nf,
const cfloat *d_filt,
unsigned batchf,
751 unsigned ni,
const double *d_in,
unsigned batchi,
752 unsigned nf,
const double *d_filt,
unsigned batchf,
756 unsigned ni,
const cdouble *d_in,
unsigned batchi,
757 unsigned nf,
const double *d_filt,
unsigned batchf,
761 unsigned ni,
const cdouble *d_in,
unsigned batchi,
762 unsigned nf,
const cdouble *d_filt,
unsigned batchf,
778 unsigned mi,
unsigned ni,
const float *d_in,
unsigned batch_in,
779 unsigned mf,
unsigned nf,
const float *d_filt,
unsigned batch_filt,
783 unsigned mi,
unsigned ni,
const cfloat *d_in,
unsigned batch_in,
784 unsigned mf,
unsigned nf,
const float *d_filt,
unsigned batch_filt,
788 unsigned mi,
unsigned ni,
const cfloat *d_in,
unsigned batch_in,
789 unsigned mf,
unsigned nf,
const cfloat *d_filt,
unsigned batch_filt,
793 unsigned mi,
unsigned ni,
const double *d_in,
unsigned batch_in,
794 unsigned mf,
unsigned nf,
const double *d_filt,
unsigned batch_filt,
798 unsigned mi,
unsigned ni,
const cdouble *d_in,
unsigned batch_in,
799 unsigned mf,
unsigned nf,
const double *d_filt,
unsigned batch_filt,
803 unsigned mi,
unsigned ni,
const cdouble *d_in,
unsigned batch_in,
804 unsigned mf,
unsigned nf,
const cdouble *d_filt,
unsigned batch_filt,
822 unsigned ndimsi,
unsigned *dimsi,
823 const float *d_in,
unsigned batchi,
824 unsigned ndimsf,
unsigned *dimsf,
825 const float *d_filt,
unsigned batchf,
829 unsigned ndimsi,
unsigned *dimsi,
830 const cfloat *d_in,
unsigned batchi,
831 unsigned ndimsf,
unsigned *dimsf,
832 const float *d_filt,
unsigned batchf,
836 unsigned ndimsi,
unsigned *dimsi,
837 const cfloat *d_in,
unsigned batchi,
838 unsigned ndimsf,
unsigned *dimsf,
839 const cfloat *d_filt,
unsigned batchf,
843 unsigned ndimsi,
unsigned *dimsi,
844 const double *d_in,
unsigned batchi,
845 unsigned ndimsf,
unsigned *dimsf,
846 const double *d_filt,
unsigned batchf,
850 unsigned ndimsi,
unsigned *dimsi,
851 const cdouble *d_in,
unsigned batchi,
852 unsigned ndimsf,
unsigned *dimsf,
853 const double *d_filt,
unsigned batchf,
857 unsigned ndimsi,
unsigned *dimsi,
858 const cdouble *d_in,
unsigned batchi,
859 unsigned ndimsf,
unsigned *dimsf,
860 const cdouble *d_filt,
unsigned batchf,
879 unsigned ndimsi,
unsigned *dimsi,
880 const float *d_in,
unsigned batchi,
881 unsigned ndimsf,
unsigned *dimsf,
882 const float *h_filt,
unsigned batchf,
886 unsigned ndimsi,
unsigned *dimsi,
887 const cfloat *d_in,
unsigned batchi,
888 unsigned ndimsf,
unsigned *dimsf,
889 const float *h_filt,
unsigned batchf,
893 unsigned ndimsi,
unsigned *dimsi,
894 const double *d_in,
unsigned batchi,
895 unsigned ndimsf,
unsigned *dimsf,
896 const double *h_filt,
unsigned batchf,
900 unsigned ndimsi,
unsigned *dimsi,
901 const cdouble *d_in,
unsigned batchi,
902 unsigned ndimsf,
unsigned *dimsf,
903 const double *h_filt,
unsigned batchf,
978 #define APPROX(ty, tx, T) \
979 AFAPI afError af_approx1_##T(ty *d_YI, \
981 const ty *d_Y , unsigned batch_Y, \
983 const tx *d_XI, unsigned batch_XI, \
984 char method, float offgrid)
1000 APPROX(
float,
float,S);
1001 APPROX(
double,
double,D);
1008 #define APPROX(tz, ti, T) \
1009 AFAPI afError af_approx2_##T(tz *d_ZI, \
1010 unsigned nx, unsigned ny, \
1011 const tz *d_Z, unsigned batch_Z, \
1013 const ti *d_XI, unsigned batch_XI, \
1014 const ti *d_YI, unsigned batch_YI, \
1015 char method, float offgrid)
1034 APPROX(
float,
float, S);
1035 APPROX(
double,
double, D);
1036 APPROX(
cfloat,
float, C);
afError af_fft2_S(unsigned xo, unsigned yo, cfloat *d_O, unsigned xi, unsigned yi, const float *d_I, unsigned batch, int direction)
Single precision, two dimensional fft.
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_fft_S(dim3 dim_O, cfloat *d_O, dim3 dim_I, const float *d_I, unsigned batch, int dim, int direction)
Single precision, One dimensional fft along dimension.
afError af_scale2D_Z(cdouble *d_ZI, unsigned md, unsigned nd, const cdouble *d_Z, int factor, char method)
array iir(int nb, const float *h_b, int na, const float *h_a, const array &x)
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.
array fir(int nb, const float *h_b, const array &x)
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_scale2D_C(cfloat *d_ZI, unsigned md, unsigned nd, const cfloat *d_Z, int factor, char method)
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_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_fft_C(dim3 dim_O, cfloat *d_O, dim3 dim_I, const cfloat *d_I, unsigned batch, int dim, int direction)
Complex, Single precision, One dimensional fft along dimension.
afError af_filter1D_D(double *d_out, unsigned len_in, const double *d_in, unsigned len_a, const double *h_a, unsigned len_b, const double *h_b, const double *d_init, double *d_final, unsigned Nin, unsigned Ninit)
Double-precision, Transposed direct form II filtering.
afError af_fft_clear(void)
Clear the fft plan cache.
array fft2(const array &, int nx=-1, int ny=-1)
Fast Fourier Transform in two dimensions.
afError af_fft3_S(dim3 dims_O, cfloat *d_O, dim3 dims_I, const float *d_I, unsigned batch, int direction)
Single precision, multi-dimensional fft.
afError
Definition: defines.h:10
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.
cuDoubleComplex cdouble
Definition: defines.h:109
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_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.
const double NaN
representation for not-a-number
afError af_scale2D_S(float *d_ZI, unsigned md, unsigned nd, const float *d_Z, int factor, char method)
Rescale a Matrix.
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_fft_Z(dim3 dim_O, cdouble *d_O, dim3 dim_I, const cdouble *d_I, unsigned batch, int dim, int direction)
Complex, Double precision, One dimensional fft along dimension.
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_fft2_Z(unsigned xo, unsigned yo, cdouble *d_O, unsigned xi, unsigned yi, const cdouble *d_I, unsigned batch, int direction)
Complex, Double precision, two dimensional fft.
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_filter1D_S(float *d_out, unsigned len_in, const float *d_in, unsigned len_a, const float *h_a, unsigned len_b, const float *h_b, const float *d_init, float *d_final, unsigned Nin, unsigned Ninit)
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)
array ifft3(const array &, const dim4 &dims=dim4(0))
Inverse Fast Fourier Transform in three dimensions.
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_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.
#define AFAPI
Definition: defines.h:45
array approx1(const array &Y, const array &Xi, char method='L', float offgrid=af::NaN)
Interpolation in one dimension (1D).
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.
array ifft2(const array &, int nx=-1, int ny=-1)
Inverse Fast Fourier Transform in two dimensions.
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.
void af_fft_info(void)
Print status of fft plan cache.
array fft(const array &, int pad=-1)
Fast Fourier Transform in one dimension.
afError af_fft2_C(unsigned xo, unsigned yo, cfloat *d_O, unsigned xi, unsigned yi, const cfloat *d_I, unsigned batch, int direction)
Complex, Single precision, two dimensional fft.
afError af_filter1D_C(cfloat *d_out, unsigned len_in, const cfloat *d_in, unsigned len_a, const float *h_a, unsigned len_b, const float *h_b, const cfloat *d_init, cfloat *d_final, unsigned Nin, unsigned Ninit)
Complex, single-precision, Transposed direct form II filtering.
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_fft3_Z(dim3 dims_O, cdouble *d_O, dim3 dims_I, const cdouble *d_I, unsigned batch, int direction)
Complex, Double precision, multi-dimensional fft.
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.
array approx2(const array &Z, const array &Xi, const array &Yi, char method='L', float offgrid=af::NaN)
Interpolation in two dimensions (2D): z=f(x,y)
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.
array filter(const array &image, const array &kernel)
Image Filtering.
afError af_filter1D_Z(cdouble *d_out, unsigned len_in, const cdouble *d_in, unsigned len_a, const double *h_a, unsigned len_b, const double *h_b, const cdouble *d_init, cdouble *d_final, unsigned Nin, unsigned Ninit)
Complex, single-precision, Transposed direct form II filtering.
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.
array convolve(const array &f1, const array &f2, const array &signal, bool expand=false)
Separable convolution (2D) with device arrays.
cuFloatComplex cfloat
Definition: defines.h:108
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_fft_D(dim3 dim_O, cdouble *d_O, dim3 dim_I, const double *d_I, unsigned batch, int dim, int direction)
Double precision, One dimensional fft along dimension.
afError af_fft3_C(dim3 dims_O, cfloat *d_O, dim3 dims_I, const cfloat *d_I, unsigned batch, int direction)
Complex, Single precision, multi-dimensional fft.
afError af_fft2_D(unsigned xo, unsigned yo, cdouble *d_O, unsigned xi, unsigned yi, const double *d_I, unsigned batch, int direction)
Double precision, two dimensional fft.
afError af_scale2D_D(double *d_ZI, unsigned md, unsigned nd, const double *d_Z, int factor, char method)
afError af_fft_setplans(int max_plans)
Set the cache size for CUfft plans.
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.
afError af_scale2D_c(char *d_ZI, unsigned md, unsigned nd, const char *d_Z, int factor, char method)
Character (8-bit) rescale.
array fft3(const array &, const dim4 &dims=dim4(0))
Fast Fourier Transform in three dimensions.
afError af_fft3_D(dim3 dims_O, cdouble *d_O, dim3 dims_I, const double *d_I, unsigned batch, int direction)
Double precision, multi-dimensional fft.
array ifft(const array &, int pad=-1)
Inverse Fast Fourier Transform in one dimension.