Closed clnorris closed 1 year ago
Unfortunately, KFR doesn't support fixed-point math. Hardware FPU or, better, a floating point SIMD is required for it to work. On the other hand, KFR supports integer math and some algorithms may be emulated using integer operations but there are no pre-made algorithms that work with fixed-point data.
I'm working on an app that is needing fixed point DSP. Comparing with CMSIS-DSP, this would be q31_t, so in kfr I am trying to use int32_t with the kfr templates. I am building with aarch64-xilinx-linux-clang++
I declare my coefficients like this:
univector<int32_t, NUM_TAPS> firCoeffs = { <snip> };
And my filter like this:
convolve_filter<int32_t>* _pFilter = new convolve_filter<q31_t>(firCoeffs, BLOCK_SIZE);
During link, I get this error:
[build] aarch64-xilinx-linux-ld.lld: error: undefined symbol: kfr::neon64::convolve_filter<int>::convolve_filter(kfr::univector<int const, 0ul> const&, unsigned long)
I was able to build ok if I use filter_fir instead of convolve_filter. It also builds ok if I use convolve_filter.
This leads to a usage question, does convolve_filter support fixed width types, or does it have to be a float? Need help to determine if this is a bug or an incompatible usage.