·  Home
+   man pages
 -> Linux -> FreeBSD -> OpenBSD -> NetBSD -> Tru64 Unix -> HP-UX 11i -> IRIX
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

man pages->IRIX man pages -> complib/sprod1du (3)
 Title
 Content
 Arch
 Section All Sections 1 - General Commands 2 - System Calls 3 - Subroutines 4 - Special Files 5 - File Formats 6 - Games 7 - Macros and Conventions 8 - Maintenance Commands 9 - Kernel Interface n - New Commands

### Contents

```
sprod1du,dprod1du(3F)					 sprod1du,dprod1du(3F)

```

### NAME[Toc][Back]

```     sprod1du, dprod1du	- Compute the product of a 1D Fourier transform	with a
1D	filter.
```

### SYNOPSYS[Toc][Back]

```     Fortran :
subroutine	sprod1du( n, array, inca, filter, incf)
integer   n, p, inca,	incf
real	    array(0:(n-1)*inca), filter(0:(n-1)*incf)

subroutine	dprod1du( n, array, inca, filter, incf)
integer   n, p, inca,	lda, incf, ldf
real*8    array(0:(n-1)*inca), filter(0:(n-1)*incf)

C :
#include <fft.h>
int sprod1du(int n, float *array, int inca,
float *filter, int incf);
int dprod1du(int n, double	*array,int inca,
double *filter, int incf);

```

### DESCRIPTION[Toc][Back]

```     sprod1du and dprod1du compute the product of the Fourier transforms of a
real sequence of N	samples	with the Fourier transforms of a real filter.
Note, the product of the Fourier transforms of two	sequences is equal to
the Fourier transform of their convolution.

```

### PARAMETERS[Toc][Back]

```     N Integer,	the number of samples in each sequence.
Unchanged on exit.	 ARRAY Array containing	the Fourier Transform.	On
exit, the array is	overwritten by the product.

INCA Integer, increment between two consecutive elements of the sequence.
Unchanged on exit.

FILTER Array containing the Fourier Transform of the filter(s).
Unchanged on exit.

INCF Integer, increment between two consecutive elements of the filter.
Unchanged on exit.

Example	of Calling Sequence
Working on	a sequences of 1024 real values.  We successively apply	a
Direct Fourier Transform, the product with	a filter transform, then an
Inverse Fourier TransformElements
of each sequence are stored with increment (stride)1.
Fortran
real array(0:1026-1),	filter(0:1026-1), coeff(1024+15)

Page 1

sprod1du,dprod1du(3F)					 sprod1du,dprod1du(3F)

call scfft1dui( 1024, coeff)
call scfft1du( -1, 1024, array, 1, coeff)
call sprod1du( 1024, array, 1, filter,
call csfft1du(  1, 1024, array, 1, coeff)

C
#include <fft.h>
float	array[1026], filter[1026], *coeff;
coeff	= scfft1dui( 1024, NULL);
scfft1du( -1,	1024, array, 1,	coeff);
sprod1du( 1024, array, 1, filter, 1);
csfft1du( -1,	1024, array, 1,	coeff);

NOTE_1 : Using a 0	leading	dimension for the filter is equivalent to
applying the same filter to all the input sequences.

NOTE_2 : As the FFTs are not normalized, a	successive direct, then
inverse transform,	scales the original input by the size of the sequence.
Rather than calling sscal1d or dscal1d to scale back the result, this
scaling factor could be directly applied to the filter transform, thus
saving some extra work.
```

```     fft, scfft1dui, dzfft1dui,	scfft1du, dzfft1du, sprod1du, dprod1du,