CMSIS-DSP icon indicating copy to clipboard operation
CMSIS-DSP copied to clipboard

In-place filtering, complex computation

Open Alouettesu opened this issue 2 years ago • 3 comments

Can input and output arrays in filtering functions and complex math functions be same?

arm_fir_f32(&S, samples, samples, N);
arm_biquad_cascade_df2T_f32(&S, samples, samples, N);
arm_cmplx_mag_f32(samples, samples, numSamples);

If this is possible, it should be mentioned in documentation. If impossible, these arguments must be marked with restrict attribute.

Alouettesu avatar Jun 26 '23 06:06 Alouettesu

@Alouettesu It is on my to do list to review (and document) the functions where the output can be the input. And when the output can be the input, I'll create also a separate version with restrict keyword where the output and input must be different.

For complex mag, it is possible to do in place processing. For the filtering I don't (yet) know.

christophe0606 avatar Jul 03 '23 09:07 christophe0606

Hi Cristopher, did you have any chance to review this issue?

JustasSiauliai avatar Sep 15 '23 09:09 JustasSiauliai

@JustasSiauliai Unfortunately, documenting all of this is a change that will take a long time since there are lots of function to review and update. The most secure is to assume you can't do in-place filtering.

christophe0606 avatar Sep 15 '23 10:09 christophe0606