Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
15 Views

exp function

Jump to solution
hello, i am writing fortran code. about 20% of the time is spent calling the vectorized exp operator. will the vectorized exp function in ipp be quicker? if so, what sort of performance boost can i expect? i do not mind loosing a bit of accuracy.
thanks, T.
0 Kudos

Accepted Solutions
Highlighted
15 Views
Hi,

It's difficult to be precise in answer without seeing the actual code.

First, both IPP and latest Intel Visual Fortran XE12.0 have math function accuracy controls so you can choosedesired (and comparable)level of accuracy in both products.

Fortran compiler switch -fimf-precision[=value[:funclist]] allows you to set high, medium, or low precision which will be roughly equivalent to IPP Fixed-Accuracy Function variants ipps__, where is either 32f (single precision) or 64f (double precision), and choices are24, 21, 11 for single precision and 53, 50, 26 for double precision.

With roughly equivalent accuracy settings the actual performance depends on several factors. The most important one is the vector length that you use for computing vector exponential. For relatively short vectors (~100 elements or less) vectorized Fortran math functions are typically faster. For longer vectors (~1000 elements or greater) you might see IPP functions performing somewhat faster.

I hope that helps,
Regards,
Sergey

View solution in original post

0 Kudos
1 Reply
Highlighted
16 Views
Hi,

It's difficult to be precise in answer without seeing the actual code.

First, both IPP and latest Intel Visual Fortran XE12.0 have math function accuracy controls so you can choosedesired (and comparable)level of accuracy in both products.

Fortran compiler switch -fimf-precision[=value[:funclist]] allows you to set high, medium, or low precision which will be roughly equivalent to IPP Fixed-Accuracy Function variants ipps__, where is either 32f (single precision) or 64f (double precision), and choices are24, 21, 11 for single precision and 53, 50, 26 for double precision.

With roughly equivalent accuracy settings the actual performance depends on several factors. The most important one is the vector length that you use for computing vector exponential. For relatively short vectors (~100 elements or less) vectorized Fortran math functions are typically faster. For longer vectors (~1000 elements or greater) you might see IPP functions performing somewhat faster.

I hope that helps,
Regards,
Sergey

View solution in original post

0 Kudos