XCORE SDK
XCORE Software Development Kit
modules
core
modules
xs3_math
lib_xs3_math
test
fft_tests
src
fft.h
1
/*
2
* Free FFT and convolution (C)
3
*
4
* Copyright (c) 2018 Project Nayuki. (MIT License)
5
* https://www.nayuki.io/page/free-small-fft-in-multiple-languages
6
*
7
* Permission is hereby granted, free of charge, to any person obtaining a copy of
8
* this software and associated documentation files (the "Software"), to deal in
9
* the Software without restriction, including without limitation the rights to
10
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11
* the Software, and to permit persons to whom the Software is furnished to do so,
12
* subject to the following conditions:
13
* - The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
15
* - The Software is provided "as is", without warranty of any kind, express or
16
* implied, including but not limited to the warranties of merchantability,
17
* fitness for a particular purpose and noninfringement. In no event shall the
18
* authors or copyright holders be liable for any claim, damages or other
19
* liability, whether in an action of contract, tort or otherwise, arising from,
20
* out of or in connection with the Software or the use or other dealings in the
21
* Software.
22
*/
23
24
#include <stdbool.h>
25
#include <stddef.h>
26
27
28
/*
29
* Computes the discrete Fourier transform (DFT) of the given complex vector, storing the result back into the vector.
30
* The vector can have any length. This is a wrapper function. Returns true if successful, false otherwise (out of memory).
31
*/
32
int
Fft_transform(
double
real[],
double
imag[],
size_t
n);
33
34
35
/*
36
* Computes the inverse discrete Fourier transform (IDFT) of the given complex vector, storing the result back into the vector.
37
* The vector can have any length. This is a wrapper function.
38
* Returns true if successful, false otherwise (out of memory).
39
*/
40
int
Fft_inverseTransform(
double
real[],
double
imag[],
size_t
n);
41
Generated by
1.9.1