I’m trying to implement some high precision code using the dbldbl headers and I’m running into a strange problem on the host side and I was wondering if anyone had any advice. I’m running linux and using cuda RC6 and gcc 4.8.1 with the quadmath library (and ideally using the boost float128 datatype). The basic idea is to do a calculation on the gpu using the dbldbl type, transfer the result to a __float128 (or float128) and do some host-side calculations on it. However, if I try to include the <quadmath.h> header in a .cu file I get compilation errors, starting with this:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/quadmath.h(32): error: invalid argument to attribute “mode”
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/quadmath.h(43): error: identifier “__float128” is undefined
However, if I put the quadmath stuff into a separate .cpp file then I can compile and link and everything is hunky-dory. This is a possible solution but will require a rewrite (which might be worth doing anyway, but that’s another story).
So, my question is, is it possible to use quad-precision variables (on the host only) inside of a .cu file?
Thanks for any input,