Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dcnvcor2(3P) — Sun WorkShop 5.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

dcnvcor2(3P)

NAME

dcnvcor2 - compute the convolution or correlation of real matrices

SUBROUTINE DCNVCOR2 (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

DOUBLE PRECISION WORK(∗), X(∗), Y(∗), Z(∗)

 

 

#include <sunperf.h>

void dcnvcor2(char cnvcor, char method, char transx, char scratchx, char transy, char scratchy, int mx, int nx, double ∗x, int ldx, int my, int ny, int mpre, int npre, double ∗y, int ldy, int mz, int nz, double ∗z, int ldz, doublecomplex ∗workin, int lwork);

PURPOSE

DCNVCOR 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) DOUBLE PRECISION(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) DOUBLE PRECISION(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.  DCNVCOR will return immediately if NZ = 0.

Z (output) DOUBLE PRECISION(LDZ,∗)
Result vectors.

WORK (input/scratch) DOUBLE PRECISION(LWORK)
On entry for the first call to DCNVCOR2, 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.

SunOS 5.0  —  Last change: 10 Dec 1998

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026