Ticket #4356: boost-cuda.patch

File boost-cuda.patch, 1.9 KB (added by anonymous, 12 years ago)
  • mpl/aux_/integral_wrapper.hpp

    diff -urN boost~/mpl/aux_/integral_wrapper.hpp boost/mpl/aux_/integral_wrapper.hpp
    old new  
    5656// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
    5757// while some other don't like 'value + 1' (Borland), and some don't like
    5858// either
    59 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
     59#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)  || defined(__CUDACC__)
    6060 private:
    6161    BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
    6262    BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
  • mpl/size_t_fwd.hpp

    diff -urN boost~/mpl/size_t_fwd.hpp boost/mpl/size_t_fwd.hpp
    old new  
    2020
    2121BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
    2222
     23#if defined(__CUDACC__)
     24typedef std::size_t std_size_t;
     25template< std_size_t N > struct size_t;
     26#else
    2327template< std::size_t N > struct size_t;
     28#endif
    2429
    2530BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
    2631BOOST_MPL_AUX_ADL_BARRIER_DECL(size_t)
  • mpl/size_t.hpp

    diff -urN boost~/mpl/size_t.hpp boost/mpl/size_t.hpp
    old new  
    1616
    1717#include <boost/mpl/size_t_fwd.hpp>
    1818
     19
     20#if defined(__CUDACC__)
     21
     22//typedef std::size_t std_size_t;
     23#define AUX_WRAPPER_VALUE_TYPE std_size_t
     24#define AUX_WRAPPER_NAME size_t
     25#define AUX_WRAPPER_PARAMS(N) std_size_t N
     26
     27#else
     28
    1929#define AUX_WRAPPER_VALUE_TYPE std::size_t
    2030#define AUX_WRAPPER_NAME size_t
    2131#define AUX_WRAPPER_PARAMS(N) std::size_t N
    2232
     33#endif
     34
    2335#include <boost/mpl/aux_/integral_wrapper.hpp>
    2436
    2537#endif // BOOST_MPL_SIZE_T_HPP_INCLUDED