projectNe10 / Ne10

An open optimized software library project for the ARM® Architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mistake in real-to-complex FFT example usage (comment) in NE10_dsp.h when directly calling neon implementation

michaelkrassowizkiy opened this issue · comments

At line 321 in NE10_dsp.h in the comment section of the Real-to-Complex FFT in Example Usage, you would try to call a function that does not exist:

ne10_fft_r2c_cfg_float32_t cfg = ne10_fft_alloc_r2c_float32_neon(fftSize);

Checking in my own project files and looking at the documentation, there is, unlike for the c2c case, no specific neon implementation for getting the configuration structure, i. e. there are are specialized neon (_neon) and c (_c) implementations for ne10_fft_alloc_c2c_float32() [1], but for ne10_fft_alloc_r2c_float32() there are not [2].

[1] https://projectne10.github.io/Ne10/doc/group__C2C__FFT__IFFT.html
[2] https://projectne10.github.io/Ne10/doc/group__R2C__FFT__IFFT.html

I assume this went unnoticed because you usually will not call the specific implementation anyway but, if you for some reason want/need to and are looking for an example, you will likely end up here.

The easiest fix would be just to call the correct (generic) function. Though it might be worth considering to add _c/_neon function pointers pointing at the correct function for consistency, which was probably the reason for this mistake in the first place.

Have a nice day,

Michael