home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
fft32_a.zip
/
FFT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-01-21
|
1KB
|
45 lines
/* pcfft.c by J.G.G. Dobbe - Test program written in Turbo C/Borland C
* that used the C or assembler version of FFT. It depends on
* the type of FFT object file whether the C or ASM version is
* linked in. In both cases, the same FFT.H file is used.
*/
#define INCL_BASE
#include <os2.h>
#include <stdio.h>
#include "pcfft.h"
#define SIZE 1024
#define powr 10
/* The power passed to Fft is the base 2 logarithm of the size
* for example, if SIZE is 64 powr = 6, since 2 to the 6th power = 64
*/
float re[SIZE];
float im[SIZE];
DATETIME datetime;
int main()
{
int i;
long time();
long starttime;
long benchtime;
for( i= 0; i< SIZE; i++)
{
re[i] = 0.0;
im[i] = 0.0;
}
re[0] = 100.0;
printf("start \n\r");
DosGetDateTime(&datetime);
printf("Min: %u Sec: %u Hundreths: %u\n\r",datetime.minutes,datetime.
seconds,datetime.hundredths);
Fft(re,im,powr,1);
DosGetDateTime(&datetime);
printf("Min: %u Sec: %u Hundreths: %u\n\r",datetime.minutes,datetime.
seconds,datetime.hundredths);
printf("finish \n\r");
Fft(re,im,powr,-1);
return 0;
}