NAME scnvcor2 - compute the convolution or correlation of real matrices SUBROUTINE SCNVCOR2 (CNVCOR, METHOD, TRANSX, SCRATCHX, TRANSY, SCRATCHY, MX, NX, X, LDX, MY, NY, MPRE, NPRE, Y, LDY, MZ, NZ, Z, LDZ, WORK, LWORK) CHARACTER CNVCOR, METHOD, SCRATCHX, SCRATCHY, TRANSX, TRANSY INTEGER LDX, LDY, LDZ, LWORK, MPRE, MX, MY, MZ, NPRE, NX, NY, NZ REAL X(*), Y(*), Z(*) REAL WORK(*) #include <sunperf.h> void scnvcor2(char cnvcor, char method, char transx, char scratchx, char transy, char scratchy, int mx, int nx, float *x, int ldx, int my, int ny, int mpre, int npre, float *y, int ldy, int mz, int nz, float *z, int ldz, complex *workin, int lwork); PURPOSE SCNVCOR computes the convolution or correlation of real matrices. ARGUMENTS CNVCOR (input) CHARACTER 'V' or 'v' to compute convolution, 'R' or 'r' to compute correlation. METHOD (input) CHARACTER 'T' or 't' if the Fourier transform method is to be used, 'D' or 'd' to compute directly from the definition. TRANSX (input) CHARACTER 'N' or 'n' if X is the filter matrix, 'T' or 't' if transpose(X) is the filter matrix. SCRATCHX (input) CHARACTER 'N' or 'n' if X must be preserved, 'S' or 's' if X can be used as scratch space. The contents of X are undefined after returning from a call in which X is allowed to be used for scratch. TRANSY (input) CHARACTER 'N' or 'n' if Y is the input matrix, 'T' or 't' if transpose(Y) is the filter matrix. SCRATCHY (input) CHARACTER 'N' or 'n' if Y must be preserved, 'S' or 's' if Y can be used as scratch space. The contents of Y are undefined after returning from a call in which Y is allowed to be used for scratch. MX (input) INTEGER Number of rows in the filter matrix. MX >= 0. NX (input) INTEGER Number of columns in the filter matrix. NX >= 0. X (input/output) REAL(LDX,NX) On entry, the filter matrix. Unchanged on exit if SCRATCHX is 'N' or 'n', undefined on exit if SCRATCHX is 'S' or 's'. LDX (input) INTEGER Leading dimension of the array that contains the filter matrix. MY (input) INTEGER Number of rows in the input matrix. MY >= 0. NY (input) INTEGER Number of columns in the input matrix. NY >= 0. MPRE (input) INTEGER Number of implicit zeros to prepend to each row of the input matrix. MPRE >= 0. NPRE (input) INTEGER Number of implicit zeros to prepend to each column of the input matrix. NPRE >= 0. Y (input/output) REAL(LDY,*) Input matrix. Unchanged on exit if SCRATCHY is 'N' or 'n', undefined on exit if SCRATCHY is 'S' or 's'. LDY (input) INTEGER Leading dimension of the array that contains the input matrix. NZ (input) INTEGER Length of the output vectors. NZ >= 0. SCNVCOR will return immediately if NZ = 0. Z (output) REAL(LDZ,*) Result vectors. WORK (input/scratch) REAL(LWORK) On entry for the first call to SCNVCOR2, WORK(1) must contain CMPLX(0.0,0.0). After the first call, WORK(1) must be set to CMPLX(0.0,0.0) iff WORK has been altered since the last call to this subroutine. LWORK (input) INTEGER Length of the work vector. If the FFT is to be used then for best performance LWORK should be at least 30 words longer than the amount of memory needed to hold the trig tables. If the FFT is not used, the value of LWORK is unimportant.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |