mirror of
https://github.com/boostorg/config.git
synced 2025-08-01 05:14:28 +02:00
Fix Trac 11852: GCC & CUDA __float128
Fix trac issue https://svn.boost.org/trac/boost/ticket/11852 Similar to https://svn.boost.org/trac/boost/ticket/8048 `__float128` is still unsupported when compiling with nvcc (tested with `CUDA 7.5.18`). First noticed with the latest release (`1.60.0`) and `GCC 4.8.5` but should affect all previous releases depending on used modules. In my case, I triggered it with the components `program_options regex filesystem system thread math_tr1` enabled .
This commit is contained in:
@@ -134,7 +134,7 @@
|
|||||||
// Recent GCC versions have __int128 when in 64-bit mode.
|
// Recent GCC versions have __int128 when in 64-bit mode.
|
||||||
//
|
//
|
||||||
// We disable this if the compiler is really nvcc as it
|
// We disable this if the compiler is really nvcc as it
|
||||||
// doesn't actually support __int128 as of CUDA_VERSION=5000
|
// doesn't actually support __int128 as of CUDA_VERSION=7500
|
||||||
// even though it defines __SIZEOF_INT128__.
|
// even though it defines __SIZEOF_INT128__.
|
||||||
// See https://svn.boost.org/trac/boost/ticket/8048
|
// See https://svn.boost.org/trac/boost/ticket/8048
|
||||||
// Only re-enable this for nvcc if you're absolutely sure
|
// Only re-enable this for nvcc if you're absolutely sure
|
||||||
@@ -148,12 +148,16 @@
|
|||||||
// include a std lib header to detect this - not ideal, but we'll
|
// include a std lib header to detect this - not ideal, but we'll
|
||||||
// be including <cstddef> later anyway when we select the std lib.
|
// be including <cstddef> later anyway when we select the std lib.
|
||||||
//
|
//
|
||||||
|
// Nevertheless, as of CUDA 7.5, using __float128 with the host
|
||||||
|
// compiler is still not supported.
|
||||||
|
// See https://svn.boost.org/trac/boost/ticket/11852
|
||||||
|
//
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#else
|
#else
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__)
|
#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(__CUDACC__)
|
||||||
# define BOOST_HAS_FLOAT128
|
# define BOOST_HAS_FLOAT128
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user