1
0
forked from boostorg/mp11

Changed precompiler test for cuda 9 workaround

BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) was not working because
BOOST_CUDA_VERSION is defined as sum without brackets so / 1000000 was only
applied to the last addend.
This commit is contained in:
Alexander Matthes
2018-04-27 08:52:54 +02:00
parent b78e808fc1
commit 6cd7355d94
3 changed files with 8 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ struct list_size_mismatch
{ {
}; };
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<template<class...> class F, class... L> struct mp_transform_cuda_workaround template<template<class...> class F, class... L> struct mp_transform_cuda_workaround
{ {
@@ -112,7 +112,7 @@ template<template<class...> class F, class... L> using mp_transform = typename m
#else #else
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<template<class...> class F, class... L> using mp_transform = typename detail::mp_transform_cuda_workaround< F, L...>::type::type; template<template<class...> class F, class... L> using mp_transform = typename detail::mp_transform_cuda_workaround< F, L...>::type::type;
@@ -320,7 +320,7 @@ template<class L, std::size_t I> struct mp_at_c_impl
#endif #endif
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<class L, std::size_t I> struct mp_at_c_cuda_workaround template<class L, std::size_t I> struct mp_at_c_cuda_workaround
{ {
@@ -331,7 +331,7 @@ template<class L, std::size_t I> struct mp_at_c_cuda_workaround
} // namespace detail } // namespace detail
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<class L, std::size_t I> using mp_at_c = typename detail::mp_at_c_cuda_workaround< L, I >::type::type; template<class L, std::size_t I> using mp_at_c = typename detail::mp_at_c_cuda_workaround< L, I >::type::type;
@@ -578,7 +578,7 @@ template<template<class...> class L, class T1, class... T, std::size_t I, templa
using L2 = mp_second<part>; using L2 = mp_second<part>;
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
struct detail struct detail
{ {

View File

@@ -133,7 +133,7 @@ template<
using type = typename mp_append_impl<prefix, Lr...>::type; using type = typename mp_append_impl<prefix, Lr...>::type;
}; };
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<class... L> template<class... L>
struct mp_append_impl_cuda_workaround struct mp_append_impl_cuda_workaround

View File

@@ -106,7 +106,7 @@ struct mp_no_type
{ {
}; };
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<template<class...> class F, class... T> struct mp_defer_cuda_workaround template<template<class...> class F, class... T> struct mp_defer_cuda_workaround
{ {
@@ -117,7 +117,7 @@ template<template<class...> class F, class... T> struct mp_defer_cuda_workaround
} // namespace detail } // namespace detail
#if BOOST_WORKAROUND( BOOST_CUDA_VERSION, / 1000000 == 9 ) #if BOOST_WORKAROUND( BOOST_CUDA_VERSION, >= 9000000 && BOOST_CUDA_VERSION < 10000000 )
template<template<class...> class F, class... T> using mp_defer = typename detail::mp_defer_cuda_workaround< F, T...>::type; template<template<class...> class F, class... T> using mp_defer = typename detail::mp_defer_cuda_workaround< F, T...>::type;