Compare commits

...

4 Commits

Author SHA1 Message Date
Peter Dimov
10c6233029 Merge branch 'develop' 2017-08-29 00:44:14 +03:00
Peter Dimov
bcfe1be681 Merge pull request #40 from BenjaminW3/topic-fix-nvcc
fix compilation for nvcc+clang
2017-08-28 10:51:22 +03:00
Benjamin Worpitz
966786e7f9 fix compilation for nvcc+clang
nvcc seems to use the host compiler for preprocessing the source for the device and host compilation.
When compiling the host code with the host compiler (clang), `__builtin_assume` is detected correctly and is also available during compilation.
When compiling the device code with nvcc, this builtin function is not available.
2017-08-28 08:12:48 +02:00
Peter Dimov
087471a232 Bump msvc version checks from <= 1910 to < 1920 2017-08-23 09:16:35 +03:00
4 changed files with 5 additions and 3 deletions

View File

@@ -60,12 +60,14 @@ public:
void add_ref() BOOST_SP_NOEXCEPT void add_ref() BOOST_SP_NOEXCEPT
{ {
#if !defined(__NVCC__)
#if defined( __has_builtin ) #if defined( __has_builtin )
# if __has_builtin( __builtin_assume ) # if __has_builtin( __builtin_assume )
__builtin_assume( local_use_count_ >= 1 ); __builtin_assume( local_use_count_ >= 1 );
# endif # endif
#endif
#endif #endif
local_use_count_ = static_cast<count_type>( local_use_count_ + 1 ); local_use_count_ = static_cast<count_type>( local_use_count_ + 1 );

View File

@@ -17,7 +17,7 @@
# undef HAVE_CONSTEXPR_INIT # undef HAVE_CONSTEXPR_INIT
#endif #endif
#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 ) #if BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
# undef HAVE_CONSTEXPR_INIT # undef HAVE_CONSTEXPR_INIT
#endif #endif

View File

@@ -17,7 +17,7 @@
# undef HAVE_CONSTEXPR_INIT # undef HAVE_CONSTEXPR_INIT
#endif #endif
#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 ) #if BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
# undef HAVE_CONSTEXPR_INIT # undef HAVE_CONSTEXPR_INIT
#endif #endif

View File

@@ -17,7 +17,7 @@
# undef HAVE_CONSTEXPR_INIT # undef HAVE_CONSTEXPR_INIT
#endif #endif
#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 ) #if BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
# undef HAVE_CONSTEXPR_INIT # undef HAVE_CONSTEXPR_INIT
#endif #endif