This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IQ magnitude computation in C6657

Hi everyone,

  I am trying to calculate the magnitude of batches of 512 IQ samples on C6657 platform and I was wondering if there is any optimised way of doing it. So far, I did it with a dot product and a sqrt. The computation time is around 58 us. Is there any other way of doing? Is there any intrinsic to handle this situation?

  Thanks in advance

JaviEr

  • Hello,

    You did not mention whether your samples are integer or floating. Regardless of that there are intrinsics for dot products of integers and floats. They can be used to calculate squared magnitude, i.e. x*x'. But square root is what may slow down your app. Do you really need magnitudes? Can you stay with squared magnitude? Perhaps you magnitude may go to denominator, so reciprocal square root intrinsic may work for you.

  • Hi,

      I am working with fix-point precision. What I have implemented so far is the int dot product of I and Q. I can work with the square magnitude. I didnt find any intrinsic for square root.. I tried to implement the square root based on a numeric method but it lasts the same as the function.

      Thanks anyway

    JaviEr

  • Hello,

    I hope you already found _dotp2() for packed integers dot product. C66 should have _rsqrsp() to compute reciprocal square root of float.

    However, if your algorithm may work with squared magnitudes, I would stay there and avoid root approximation either way.