SCONV_NONPERIODIC_EXT(3dxml) — Subroutines
Name
sconv_nonperiodic_ext, dconv_nonperiodic_ext, cconv_nonperiodic_ext, zconv_nonperiodic_ext − Extended nonperiodic convolution
FORMAT
status = {S,D,C,Z}CONV_NONPERIODIC_EXT (x, nx_stride, y, ny_stride, out, out_stride, nx, ny, n_out_start, n_out_end, add_flag, scale_flag, scale, scale_stride)
Arguments
xreal∗4 | real∗8 | complex∗8 | complex∗16
On entry, an array containing the data to be convolved.
On exit, x is unchanged.
nx_strideinteger∗4
Distance between elements in the X array; nx_stride > 0
yreal∗4 | real∗8 | complex∗8 | complex∗16
On entry, an array containing the convolution or "filter" function which is to be convolved with the data from the X array.
On exit, y is unchanged.
ny_strideinteger∗4
Distance between elements in the Y array; ny_stride > 0
outreal∗4 | real∗8 | complex∗8 | complex∗16
On entry, a one-dimensional array OUT of length nx + ny - 1.
On exit, out contains the convolution coefficients.
out_strideinteger∗4
Specifies the distance between elements in the OUT array; out_stride > 0
nx, nyinteger∗4
Specifies the number of values to be operated on; nx, ny > 0
n_out_start, n_out_end
integer∗4
Specifies the range of coefficients computed; n_out_end > n_out_start. The OUT array has zero values for indices less than 0 or greater than
nx + ny -2.
For example, in the case of nx = 50 and ny = 100, the range of locations is 0 through 148. If you specify n_out_start = 5 and n_out_end = 10, the convolution function generates numbers for OUT(5) through OUT(10) and puts the results in location 0 through 5 of the OUT array.
You can also specify a range that is larger than the array, creating null elements in the output array. For example, using the same input array, you can specify n_out_start = -10 and n_out_end = 200. The convolution function can generate values for 0 through 148, putting them in location 10 through 158 of the output array. It puts null elements in the locations between 0 and 9 and between 159 and 200.
add_flaglogical∗4
Defines the operation of the convolution to add output to an existing OUT array, without overwriting it.
TRUE: Add the result of the operation to OUT array.
FALSE: Overwrite the existing OUT array.
scale_flaglogical∗4
Defines the operation of the convolution to scale the output.
TRUE: Scale the output.
FALSE: Do not scale.
scalereal∗4 | real∗8 | complex∗8 | complex∗16
The value used to scale the output. The type of value depends on scale_stride.
scale_strideinteger∗4
Defines how the scale operation is performed. scale_stride# 0:
= 0 : Scale by a scalar value
> 0: Scale by a vector, used as the stride of scale
Description
The _CONV_NONPERIODIC_EXT functions compute the nonperiodic convolution with options to control the result.
Return Values
0DXML_SUCCESS()
8DXML_ILL_N_RANGE()
13DXML_BAD_STRIDE()
Example
INCLUDE ’{file_location}DXMLDEF.FOR’
INTEGER∗4 N,STATUS
REAL∗8 A(50),B(100),C(6),SCALE_VALUE
SCALE_VALUE = 2.0
STATUS = DCONV_NONPERIODIC_EXT(A,1,B,1,C,1,50,100,5,10,.FALSE.,.TRUE.,
∗ SCALE_VALUE,0)
This FORTRAN code computes six values of a nonperiodic convolution of two vectors, C(5) to C(10), of double-precision real numbers, a and b, with lengths of 50 and 100, respectively. The result is scaled by 2.0 and stored in c with length of 6.