Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

whole number (integer) power

jeffc111
Beginner
174 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
Employee
174 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

1 Reply
Chao_Y_Intel
Employee
175 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

Reply