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

exp function

tracyx
New Contributor I
835 Views
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
1 Solution
Sergey_M_Intel2
Employee
835 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
Sergey_M_Intel2
Employee
836 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
0 Kudos
Reply