Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jeffc111
Beginner
117 Views

whole number (integer) power

Jump to solution
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
117 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
118 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

Reply