Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Jens_Bloch_H_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-08-2016
03:26 AM

1 View

/Qfast-transcendentals

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

1 Reply

Highlighted
##

TimP

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-08-2016
04:56 AM

1 View

As the main point of fast

As the main point of fast-transcendentals is the use of svml function calls, you may be able to control them with !dir$ [no]vector directives. These fast calls would occur only in vectorized loops.

Although the docs have said the default fast exp is permitted to deviate by up to 4 ULPs, such large deviations seem to apply only for large magnitude values. You would still expect better than 5 digits accuracy for default real in the border cases, and mostly 6.

I suppose you could try compiling the procedure with exp call only with fast-transcendentals while using Qipo.