Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

/Qfast-transcendentals

$
0
0

Hi,

I have a module where I need to evaluate a lot of exp functions inside a big loop. Inside this loop I don't need full precision and the /Qfast-transcendentals compiler option is tempting to apply. However other places in the module I need full precision. Is there a way to specify exactly where to use the fast algorithm?

Is it possible to apply the fast versions by a proper use statement as a replacement for the compiler option?

use some_fast_intel_module, only: exp_fast => exp

Then I could apply the optimized algorithm where i specify exp_fast and obtain full precision when I specify the standard exp.

If I make a small module like this

module math_fast ! In a separate file compiled with /Qfast-transcendentals
contains
real, elemental function exp_fast(x)
real, intent(in) :: x
exp_fast = exp(x)
end function exp_fast
end module math_fast
 

If I inline this function into the other module which is not compiled with /Qfast-transcendentals will I obtain the fast trascendental algorithm when I apply exp_fast(x)?

Thanks for your help!

Jens B. Helmers


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>