Elemental functions for real manipulation in device code

Hi.

A request, not a problem…

Many numerical models require tests against machine precision (eg. error controlled Runge Kuttas). It would be really, really useful to have access in device subroutines/functions to the standard F90/95 numeric enquiry functions and elemental functions to manipulate reals:

digits, epsilon, huge, maxexponent, minexponent, precision, radix, range, tiny, exponent, fraction, nearest, rrspacing, scale, set_exponent and spacing.

This is particularly the case as most GPUs are currently single precision, meaning that truncation errors etc. have a habbit of creeping up on you.

No rest for the wicked eh? Seriously though, these would be really, really useful…

Rob.

[/i]

Hi Rob,

The numeric inquiry intrinsics (digits, epsilon, huge, maxexponent, minexponent, precision, radix, range, tiny) are already supported in CUDA Fortran. I’ve put in a feature request for the real manipulation functions (TPR#17227)

Thanks!
Mat

That’s great! Thanks Mat.