Main Page
Namespaces
Classes
Files
File List
File Members
lib
clib
rfft.c
Go to the documentation of this file.
1
#include "../eus.h"
2
3
pointer
FFT
(
n
,argv)
4
int
n
;
5
pointer
argv[];
6
{
pointer
a
;
7
int
size;
8
float
*wsave;
9
10
ckarg
(1);
11
a=argv[0];
12
if
(!isfltvector(a))
error
(
E_FLOATVECTOR
);
13
size=vecsize(a);
14
wsave=(
float
*)malloc((size*3+15)*
sizeof
(float));
15
rffti_(&size,wsave);
16
rfftf_(&size,a->
c
.
fvec
.
fv
,wsave);
17
free(wsave);
18
return
(a);}
19
20
pointer
INVFFT
(
n
,argv)
21
int
n
;
22
pointer
argv[];
23
{
pointer
a
;
24
int
size;
25
float
*wsave;
26
27
ckarg
(1);
28
a=argv[0];
29
if
(!isfltvector(a))
error
(
E_FLOATVECTOR
);
30
size=vecsize(a);
31
wsave=(
float
*)malloc((size*3+15)*
sizeof
(float));
32
rffti_(&size,wsave);
33
rfftb_(&size,a->
c
.
fvec
.
fv
,wsave);
34
free(wsave);
35
return
(a);}
36
37
eusmain
(mod)
38
pointer
mod;
39
{
40
defun
(
"FFT"
,mod,
FFT
,
NULL
);
41
defun
(
"INVERSE-FFT"
,mod,
INVFFT
,
NULL
);
42
}
n
GLfloat n[6][3]
Definition:
cube.c:15
defun
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
ckarg
ckarg(2)
FFT
pointer FFT(int n, argv)
Definition:
rfft.c:3
E_FLOATVECTOR
Definition:
eus.h:977
cell::c
union cell::cellunion c
cell
Definition:
eus.h:379
eusmain
eusmain(pointer mod)
Definition:
rfft.c:37
error
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
Definition:
eus.c:297
NULL
#define NULL
Definition:
transargv.c:8
INVFFT
pointer INVFFT(int n, argv)
Definition:
rfft.c:20
floatvector::fv
eusfloat_t fv[1]
Definition:
eus.h:307
a
char a[26]
Definition:
freq.c:4
cell::cellunion::fvec
struct floatvector fvec
Definition:
eus.h:413
euslisp
Author(s): Toshihiro Matsui
autogenerated on Fri Feb 21 2020 03:20:54