As I tested that nvc/nvc++
already add support for long double
, so here I suggest adding real(16)
support for (amd64)CPU in nvfortran
compiler (nowadays most amd64 CPUs already have long double supoort). Otherwise programmers must rewrite their fortran code with C/C++
and compile them with nvc/nvc++
or compile the fortran src files using real(16) with other compilers like gfortran/ifx
and link them with other parts of the project compiled with nvfortran
just to build a executable even without offloading. Behaviors like this is Tricky even when we just want to offload some code only using real(8) or real(4), in a project using real(16). Further more, I also suggest a compiler feature which (optionally) automatically replace all real(16)
in accelerator code region with real(8), which makes it easier to migrate to gpu…
Thanks,
Xinyi
Hi Xinyi,
Given there isn’t native support in the hardware for quad-precision, we chose not to implement real(16). It either needs to be limited to 80-bits (using the x87 FP-unit which is not available on ARM) or software emulated which can be quite slow.
Instead, we ship the QD library with the compilers which can be used for double-double or quad-double data types. (Found in the “compilers/extras/qd/” directory). Documentation included.
-Mat
1 Like