1/*
2 * Copyright (c) 2003-2004, Mark Borgerding. All rights reserved.
3 * This file is part of KISS FFT - https://github.com/mborgerding/kissfft
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 * See COPYING file for more information.
7 */
8
9#ifndef KFC_H
10#define KFC_H
11#include "kiss_fft.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/*
18KFC -- Kiss FFT Cache
19
20Not needing to deal with kiss_fft_alloc and a config
21object may be handy for a lot of programs.
22
23KFC uses the underlying KISS FFT functions, but caches the config object.
24The first time kfc_fft or kfc_ifft for a given FFT size, the cfg
25object is created for it. All subsequent calls use the cached
26configuration object.
27
28NOTE:
29You should probably not use this if your program will be using a lot
30of various sizes of FFTs. There is a linear search through the
31cached objects. If you are only using one or two FFT sizes, this
32will be negligible. Otherwise, you may want to use another method
33of managing the cfg objects.
34
35 There is no automated cleanup of the cached objects. This could lead
36to large memory usage in a program that uses a lot of *DIFFERENT*
37sized FFTs. If you want to force all cached cfg objects to be freed,
38call kfc_cleanup.
39
40 */
41
42/*forward complex FFT */
43void KISS_FFT_API kfc_fft(int nfft, const kiss_fft_cpx * fin,kiss_fft_cpx * fout);
44/*reverse complex FFT */
45void KISS_FFT_API kfc_ifft(int nfft, const kiss_fft_cpx * fin,kiss_fft_cpx * fout);
46
47/*free all cached objects*/
48void KISS_FFT_API kfc_cleanup(void);
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif
55