I recently looked at the CMSIS DSP mathematical function library, and I saw something that I cannot fully understand, thus, my first post on SO.
What I cannot understand is how he11 can use the complex point product function to get the correct result? Function can be found here: Dot Integrated Product
As far as I understand, part
for(n=0; n<numSamples; n++) { realResult += pSrcA[(2*n)+0]*pSrcB[(2*n)+0] - pSrcA[(2*n)+1]*pSrcB[(2*n)+1]; imagResult += pSrcA[(2*n)+0]*pSrcB[(2*n)+1] + pSrcA[(2*n)+1]*pSrcB[(2*n)+0]; }
is A-okay, but like this:
real_sum += (*pSrcA++) * (*pSrcB++); imag_sum += (*pSrcA++) * (*pSrcB++);
should work because it misses the product of the real parts * of the sample samples?
It could - and most likely - really be a stupid question, but somehow I just don't see it working.
source share