123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- #ifndef _BOOST_UBLAS_CONFIG_
- #define _BOOST_UBLAS_CONFIG_
- #include <cassert>
- #include <cstddef>
- #include <algorithm>
- #include <limits>
- #include <boost/config.hpp>
- #include <boost/static_assert.hpp>
- #include <boost/noncopyable.hpp>
- #include <boost/mpl/if.hpp>
- #include <boost/mpl/and.hpp>
- #include <boost/type_traits/is_same.hpp>
- #include <boost/type_traits/is_convertible.hpp>
- #include <boost/type_traits/is_const.hpp>
- #include <boost/type_traits/remove_reference.hpp>
- #if defined(__cplusplus) && __cplusplus >= 201103L
- #define BOOST_UBLAS_CPP_GE_2011
- #elif BOOST_MSVC >= 1800
- #define BOOST_UBLAS_CPP_GE_2011
- #else
- #undef BOOST_UBLAS_CPP_GE_2011
- #endif
- #if defined (BOOST_MSVC) && ! defined (BOOST_STRICT_CONFIG)
- #if BOOST_MSVC == 1310
- #if !(defined(BOOST_UBLAS_NO_NESTED_CLASS_RELATION) || defined(BOOST_UBLAS_MSVC_NESTED_CLASS_RELATION))
- #define BOOST_UBLAS_NO_NESTED_CLASS_RELATION
- #endif
- #endif
- #endif
- #if defined (__GNUC__) && ! defined (BOOST_STRICT_CONFIG)
- #if __GNUC__ >= 4 || (__GNUC__ >= 3 && __GNUC_MINOR__ >= 4)
- #define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
- #endif
- #if __GNUC__ < 3
- #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
- #endif
- #endif
- #if defined (BOOST_INTEL) && ! defined (BOOST_STRICT_CONFIG)
- #if defined (BOOST_INTEL_LINUX) && (BOOST_INTEL_LINUX >= 800)
- #define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
- #endif
- #if (BOOST_INTEL < 700)
- #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
- #endif
- #if (BOOST_INTEL <= 800)
- namespace boost { namespace numeric { namespace ublas {
- template<class C, class IC>
- class indexed_iterator;
- template<class V>
- class index_pair;
- template<class M>
- class index_triple;
- }}}
- namespace std {
- template<class V>
- inline
- void swap (boost::numeric::ublas::index_pair<V> i1, boost::numeric::ublas::index_pair<V> i2) {
- i1.swap (i2);
- }
- template<class M>
- inline
- void swap (boost::numeric::ublas::index_triple<M> i1, boost::numeric::ublas::index_triple<M> i2) {
- i1.swap (i2);
- }
-
- template<class C, class IC>
- inline
- void iter_swap (boost::numeric::ublas::indexed_iterator<C, IC> it1,
- boost::numeric::ublas::indexed_iterator<C, IC> it2) {
- swap (*it1, *it2);
- }
- }
- #endif
- #endif
- #if defined (__COMO__) && ! defined (BOOST_STRICT_CONFIG)
- #if defined(__LIBCOMO__) && (__LIBCOMO_VERSION__ <= 31)
- #include <cstdlib>
- #endif
- #endif
- #ifdef __PGIC__
- #define BOOST_UBLAS_UNSUPPORTED_COMPILER 0
- #endif
- #if defined (__HP_aCC) && ! defined (BOOST_STRICT_CONFIG)
- # if (__HP_aCC >= 60000 )
- # define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
- #endif
- #endif
- #if defined (__sgi) && ! defined (BOOST_STRICT_CONFIG)
- #include <cstdlib>
- #if __COMPILER_VERSION >=650
- #define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
- #endif
- #endif
- #if defined (__MWERKS__) && ! defined (BOOST_STRICT_CONFIG)
- #if __MWERKS__ <= 0x3003
- #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
- #endif
- #endif
- #ifndef BOOST_UBLAS_UNSUPPORTED_COMPILER
- #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STDC_NAMESPACE)
- #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
- #endif
- #endif
- #if defined(BOOST_UBLAS_UNSUPPORTED_COMPILER) && (BOOST_UBLAS_UNSUPPORTED_COMPILER != 0)
- #error Your compiler and/or configuration is unsupported by this verions of uBLAS. Define BOOST_UBLAS_UNSUPPORTED_COMPILER=0 to override this message. Boost 1.32.0 includes uBLAS with support for many older compilers.
- #endif
- #if defined (NDEBUG) || defined (BOOST_UBLAS_NDEBUG)
- #ifndef BOOST_UBLAS_INLINE
- #define BOOST_UBLAS_INLINE inline
- #endif
- #define BOOST_UBLAS_USE_FAST_SAME
- #ifndef BOOST_UBLAS_CHECK_ENABLE
- #define BOOST_UBLAS_CHECK_ENABLE 0
- #endif
- #ifndef BOOST_UBLAS_TYPE_CHECK
- #define BOOST_UBLAS_TYPE_CHECK 0
- #endif
- #else
- #ifndef BOOST_UBLAS_INLINE
- #define BOOST_UBLAS_INLINE
- #endif
- #ifndef BOOST_UBLAS_CHECK_ENABLE
- #define BOOST_UBLAS_CHECK_ENABLE 1
- #endif
- #ifndef BOOST_UBLAS_TYPE_CHECK
- #define BOOST_UBLAS_TYPE_CHECK 1
- #endif
- #endif
- #if BOOST_UBLAS_TYPE_CHECK
- template <class Dummy>
- struct disable_type_check
- {
- static bool value;
- };
- template <class Dummy>
- bool disable_type_check<Dummy>::value = false;
- #endif
- #ifndef BOOST_UBLAS_TYPE_CHECK_EPSILON
- #define BOOST_UBLAS_TYPE_CHECK_EPSILON (type_traits<real_type>::type_sqrt (std::numeric_limits<real_type>::epsilon ()))
- #endif
- #ifndef BOOST_UBLAS_TYPE_CHECK_MIN
- #define BOOST_UBLAS_TYPE_CHECK_MIN (type_traits<real_type>::type_sqrt ( (std::numeric_limits<real_type>::min) ()))
- #endif
- #if !(defined(BOOST_UBLAS_USE_INDEXING) || defined(BOOST_UBLAS_USE_ITERATING))
- #define BOOST_UBLAS_USE_INDEXING
- #endif
- #ifndef BOOST_UBLAS_BOUNDED_ARRAY_ALIGN
- #define BOOST_UBLAS_BOUNDED_ARRAY_ALIGN
- #endif
- #ifndef BOOST_UBLAS_NO_ELEMENT_PROXIES
- #define BOOST_UBLAS_STRICT_VECTOR_SPARSE
- #define BOOST_UBLAS_STRICT_MATRIX_SPARSE
- #define BOOST_UBLAS_STRICT_HERMITIAN
- #endif
- #include <boost/numeric/ublas/fwd.hpp>
- #include <boost/numeric/ublas/detail/definitions.hpp>
- #endif
|