whole number (integer) power

whole number (integer) power

For small whole number (integer) constant powers, is it better to iteratively multiply into a temporary buffer, or use Powx?What is the tradeoff in performance vs. precision for each approach (recognizing Powx provides optional precisions)?Thanks!

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Hi,

I think simple iterative multiplication will have a better performance and good precision with small power N. You might just have a simple test with the following two ways, and see which one is better for your data:

ippsPowx_32f_A21( indata, N, ouputdata, length );

or:

for(int j=0;j

ippsMul_32f_I(outputdata, indata,length);

}

Thanks,
Chao

Leave a Comment

Please sign in to add a comment. Not a member? Join today