AnsweredAssumed Answered

Optimizing MAC operation

Question asked by mjames2393 on May 7, 2013
Latest reply on May 14, 2013 by jeyanthi.jegadeesan

Hello,

 

Any suggestions as to how I can optimize the code below even further ? I'm on SHARC 21469.

 

float doMAC(const dm float* x1, const pm float* y1, int j, int k)

{

   float sum = 0.0f;

   int i;

 

   for (i = 0; i < (LOOP_COUNT); i++)

   {

      sum = sum + (float) (x1[j] * y1[k]);

      j = circindex(j, 1, CONST_BUFFERSIZE);

      k = circindex(k, -1, CONST_BUFFERSIZE);

   }

 

   return sum;

}

 

Thank you.

Outcomes