#include <it/types.h>
#include <it/fourier.h>
#include <it/io.h>
#include <it/math.h>
Go to the source code of this file.
Defines | |
#define | CACHE_SIZE 128*1024 |
#define | DFT_LAST 16 |
#define | FDFT_FORW 0 |
#define | FDFT_BACK 1 |
Functions | |
static int | intlog2 (int n) |
void | fft_init (void) |
static void | cplx_array_bitrev_permute (cplx *v, int n) |
static void | __fft_dif (cplx *v, int log2n) |
static void | __ifft_dit (cplx *v, int log2n) |
static void | _fft (cplx *v, int log2n) |
static void | _ifft (cplx *v, int log2n) |
static void | _fft_demangle (cplx *v, int log2n) |
static void | _ifft_mangle (cplx *v, int log2n) |
cvec | it_fft (cvec v) |
cvec | it_ifft (cvec v) |
cvec | cvec_fft_conv (cvec a, cvec b) |
cvec | cvec_fft_corr (cvec a, cvec b) |
cvec | cvec_fft_autocorr (cvec a) |
cvec | it_fzt (cvec v, cplx z) |
static cvec | it_fdft (cvec v, int inv) |
static cvec | it_sdft (cvec v) |
static cvec | it_sidft (cvec v) |
cvec | it_dft (cvec v) |
cvec | it_idft (cvec v) |
cvec | it_dft_real (vec v) |
vec | it_idft_real (cvec cv) |
Variables | |
static unsigned int | cache_size = CACHE_SIZE |
static int | fft_init_done = 0 |
static int | fft_log2size |
static cvec | dft_roots [DFT_LAST] |
static cvec | fft_roots |
static ivec | fft_perm |
#define DFT_LAST 16 |
Definition at line 49 of file fourier.c.
Referenced by fft_init(), it_dft(), it_idft(), it_sdft(), and it_sidft().
static void __fft_dif | ( | cplx * | v, | |
int | log2n | |||
) | [static] |
static void __ifft_dit | ( | cplx * | v, | |
int | log2n | |||
) | [static] |
static void _fft | ( | cplx * | v, | |
int | log2n | |||
) | [static] |
Definition at line 208 of file fourier.c.
References __fft_dif(), cmul(), cvec_delete(), cvec_new(), fft_log2size, fft_perm, _cplx_::i, M_PI, and _cplx_::r.
Referenced by cvec_fft_autocorr(), cvec_fft_conv(), cvec_fft_corr(), it_fdft(), it_fft(), and it_fzt().
static void _fft_demangle | ( | cplx * | v, | |
int | log2n | |||
) | [static] |
Definition at line 347 of file fourier.c.
References cplx_array_bitrev_permute(), and fft_log2size.
Referenced by it_fft().
static void _ifft | ( | cplx * | v, | |
int | log2n | |||
) | [static] |
Definition at line 274 of file fourier.c.
References __ifft_dit(), cmul(), cvec_delete(), cvec_new(), fft_log2size, fft_perm, _cplx_::i, M_PI, and _cplx_::r.
Referenced by cvec_fft_autocorr(), cvec_fft_conv(), cvec_fft_corr(), it_fdft(), it_fzt(), and it_ifft().
static void _ifft_mangle | ( | cplx * | v, | |
int | log2n | |||
) | [static] |
Definition at line 383 of file fourier.c.
References cplx_array_bitrev_permute(), and fft_log2size.
Referenced by it_ifft().
static void cplx_array_bitrev_permute | ( | cplx * | v, | |
int | n | |||
) | [inline, static] |
Definition at line 108 of file fourier.c.
References cplx_swap.
Referenced by _fft_demangle(), and _ifft_mangle().
void fft_init | ( | void | ) |
Definition at line 71 of file fourier.c.
References cache_size, cplx_1, cvec_new_unit_roots(), cvec_push, DFT_LAST, fft_init_done, fft_log2size, fft_perm, intlog2(), and ivec_new().
Referenced by cvec_fft_autocorr(), cvec_fft_conv(), cvec_fft_corr(), it_fdft(), it_fft(), it_fzt(), it_ifft(), it_sdft(), and it_sidft().
static int intlog2 | ( | int | n | ) | [inline, static] |
Definition at line 61 of file fourier.c.
Referenced by cvec_fft_autocorr(), cvec_fft_conv(), cvec_fft_corr(), fft_init(), it_dft(), it_fdft(), it_fft(), it_fzt(), it_idft(), and it_ifft().
Definition at line 644 of file fourier.c.
References _fft(), _ifft(), cimag, cmul(), cplx_0, cplx_1, creal, cscale(), cvec_delete(), cvec_length(), cvec_mul(), cvec_new(), cvec_new_zeros(), cvec_set_length, fft_init(), _cplx_::i, intlog2(), M_PI, and _cplx_::r.
Definition at line 719 of file fourier.c.
References cadd(), cmul(), cplx_0, cvec_length(), cvec_new(), DFT_LAST, fft_init(), and N.
Referenced by it_dft().
Definition at line 745 of file fourier.c.
References cadd(), cmul(), cplx_0, cvec_div_by_real(), cvec_length(), cvec_new(), DFT_LAST, fft_init(), and N.
Referenced by it_idft().
unsigned int cache_size = CACHE_SIZE [static] |
int fft_init_done = 0 [static] |
int fft_log2size [static] |
Definition at line 55 of file fourier.c.
Referenced by __fft_dif(), __ifft_dit(), _fft(), _fft_demangle(), _ifft(), _ifft_mangle(), and fft_init().
|
|