Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

whole number (integer) power

jeffc111
Beginner
389 Views
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!
0 Kudos
1 Solution
Chao_Y_Intel
Moderator
389 Views

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

View solution in original post

0 Kudos
1 Reply
Chao_Y_Intel
Moderator
390 Views

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

0 Kudos
Reply