AnsweredAssumed Answered

accumulate with intrinsic add/sub

Question asked by DspWork on Apr 14, 2016
Latest reply on Apr 22, 2016 by Jithul_Janardhanan

Does anyone know the intrinsic or builtin function to do the following?

 

fract16  val[32];

fract32  f32sum;

acc40  acsum;

int ii=0;

 

for( ii=0; ii < 32; ii++ )

{

  f32sum += val[ii];

}

But I want to use the accumulator and an add instrinsic function.  I cannot find an intrinsic function with mixed types.

I want do something like:

 

for( ii=0; ii < 32; ii++ )

{

  acsum = __builtin_add( acsum, val[ii] );

}

 

Any help would be greatly appreciated.  Thank you.

Outcomes