2 #include <libraries/ne10/NE10.h>
5 #include <libraries/math_neon/math_neon.h>
15 Fft(
unsigned int length){ setup(length); };
17 int setup(
unsigned int length);
26 void fft(
const std::vector<float>& input);
35 void ifft(
const std::vector<float>& reInput,
const std::vector<float>& imInput);
39 float&
fdr(
unsigned int n) {
return frequencyDomain[n].r; };
43 float&
fdi(
unsigned int n) {
return frequencyDomain[n].i; };
48 float fda(
unsigned int n) {
return sqrtf_neon(
fdr(n) *
fdr(n) +
fdi(n) *
fdi(n)); };
52 float&
td(
unsigned int n) {
return timeDomain[n]; };
53 static bool isPowerOfTwo(
unsigned int n);
54 static unsigned int roundUpToPowerOfTwo(
unsigned int n);
56 ne10_float32_t* timeDomain =
nullptr;
57 ne10_fft_cpx_float32_t* frequencyDomain =
nullptr;
58 ne10_fft_r2c_cfg_float32_t cfg =
nullptr;
void ifft()
Definition: Fft.cpp:70
float & td(unsigned int n)
Definition: Fft.h:52
float & fdi(unsigned int n)
Definition: Fft.h:43
void fft()
Definition: Fft.cpp:56
float & fdr(unsigned int n)
Definition: Fft.h:39
float fda(unsigned int n)
Definition: Fft.h:48