File indexing completed on 2025-01-18 09:42:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _BOOST_UBLAS_CONFIG_
0014 #define _BOOST_UBLAS_CONFIG_
0015
0016 #include <cassert>
0017 #include <cstddef>
0018 #include <algorithm>
0019 #include <limits>
0020
0021 #include <boost/config.hpp>
0022 #include <boost/static_assert.hpp>
0023 #include <boost/noncopyable.hpp>
0024 #include <boost/mpl/if.hpp>
0025 #include <boost/mpl/and.hpp>
0026 #include <boost/type_traits/is_same.hpp>
0027 #include <boost/type_traits/is_convertible.hpp>
0028 #include <boost/type_traits/is_const.hpp>
0029 #include <boost/type_traits/remove_reference.hpp>
0030
0031
0032 #if defined(__cplusplus) && __cplusplus >= 201103L
0033
0034 #define BOOST_UBLAS_CPP_GE_2011
0035
0036 #elif BOOST_MSVC >= 1800
0037
0038 #define BOOST_UBLAS_CPP_GE_2011
0039
0040 #else
0041
0042 #undef BOOST_UBLAS_CPP_GE_2011
0043
0044 #endif
0045
0046
0047 #if defined (BOOST_MSVC) && ! defined (BOOST_STRICT_CONFIG)
0048
0049
0050 #if BOOST_MSVC == 1310
0051
0052
0053 #if !(defined(BOOST_UBLAS_NO_NESTED_CLASS_RELATION) || defined(BOOST_UBLAS_MSVC_NESTED_CLASS_RELATION))
0054 #define BOOST_UBLAS_NO_NESTED_CLASS_RELATION
0055 #endif
0056
0057 #endif
0058
0059 #endif
0060
0061
0062
0063 #if defined (__GNUC__) && ! defined (BOOST_STRICT_CONFIG)
0064
0065 #if __GNUC__ >= 4 || (__GNUC__ >= 3 && __GNUC_MINOR__ >= 4)
0066
0067 #define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
0068 #endif
0069
0070 #if __GNUC__ < 3
0071 #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
0072 #endif
0073
0074 #endif
0075
0076
0077
0078 #if defined (BOOST_INTEL) && ! defined (BOOST_STRICT_CONFIG)
0079
0080 #if defined (BOOST_INTEL_LINUX) && (BOOST_INTEL_LINUX >= 800)
0081
0082 #define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
0083 #endif
0084
0085 #if (BOOST_INTEL < 700)
0086 #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
0087 #endif
0088
0089
0090 #if (BOOST_INTEL <= 800)
0091 namespace boost { namespace numeric { namespace ublas {
0092 template<class C, class IC>
0093 class indexed_iterator;
0094
0095 template<class V>
0096 class index_pair;
0097 template<class M>
0098 class index_triple;
0099 }}}
0100
0101 namespace std {
0102 template<class V>
0103 inline
0104 void swap (boost::numeric::ublas::index_pair<V> i1, boost::numeric::ublas::index_pair<V> i2) {
0105 i1.swap (i2);
0106 }
0107 template<class M>
0108 inline
0109 void swap (boost::numeric::ublas::index_triple<M> i1, boost::numeric::ublas::index_triple<M> i2) {
0110 i1.swap (i2);
0111 }
0112
0113 template<class C, class IC>
0114 inline
0115 void iter_swap (boost::numeric::ublas::indexed_iterator<C, IC> it1,
0116 boost::numeric::ublas::indexed_iterator<C, IC> it2) {
0117 swap (*it1, *it2);
0118 }
0119 }
0120 #endif
0121
0122 #endif
0123
0124
0125
0126 #if defined (__COMO__) && ! defined (BOOST_STRICT_CONFIG)
0127
0128
0129 #if defined(__LIBCOMO__) && (__LIBCOMO_VERSION__ <= 31)
0130 #include <cstdlib>
0131 #endif
0132
0133 #endif
0134
0135
0136 #ifdef __PGIC__
0137 #define BOOST_UBLAS_UNSUPPORTED_COMPILER 0
0138 #endif
0139
0140
0141 #if defined (__HP_aCC) && ! defined (BOOST_STRICT_CONFIG)
0142 # if (__HP_aCC >= 60000 )
0143 # define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
0144 #endif
0145 #endif
0146
0147
0148
0149 #if defined (__sgi) && ! defined (BOOST_STRICT_CONFIG)
0150
0151
0152
0153 #include <cstdlib>
0154
0155 #if __COMPILER_VERSION >=650
0156
0157 #define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
0158 #endif
0159
0160 #endif
0161
0162
0163
0164 #if defined (__MWERKS__) && ! defined (BOOST_STRICT_CONFIG)
0165
0166
0167 #if __MWERKS__ <= 0x3003
0168 #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
0169 #endif
0170
0171 #endif
0172
0173
0174
0175 #ifndef BOOST_UBLAS_UNSUPPORTED_COMPILER
0176 #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STDC_NAMESPACE)
0177 #define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
0178 #endif
0179 #endif
0180
0181
0182 #if defined(BOOST_UBLAS_UNSUPPORTED_COMPILER) && (BOOST_UBLAS_UNSUPPORTED_COMPILER != 0)
0183 #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.
0184 #endif
0185
0186
0187
0188
0189 #if defined (NDEBUG) || defined (BOOST_UBLAS_NDEBUG)
0190
0191 #ifndef BOOST_UBLAS_INLINE
0192 #define BOOST_UBLAS_INLINE inline
0193 #endif
0194
0195
0196 #define BOOST_UBLAS_USE_FAST_SAME
0197
0198
0199 #ifndef BOOST_UBLAS_CHECK_ENABLE
0200 #define BOOST_UBLAS_CHECK_ENABLE 0
0201 #endif
0202
0203
0204 #ifndef BOOST_UBLAS_TYPE_CHECK
0205 #define BOOST_UBLAS_TYPE_CHECK 0
0206 #endif
0207
0208
0209
0210 #else
0211
0212 #ifndef BOOST_UBLAS_INLINE
0213 #define BOOST_UBLAS_INLINE
0214 #endif
0215
0216
0217 #ifndef BOOST_UBLAS_CHECK_ENABLE
0218 #define BOOST_UBLAS_CHECK_ENABLE 1
0219 #endif
0220
0221
0222 #ifndef BOOST_UBLAS_TYPE_CHECK
0223 #define BOOST_UBLAS_TYPE_CHECK 1
0224 #endif
0225
0226 #endif
0227
0228
0229
0230
0231
0232
0233
0234 #if BOOST_UBLAS_TYPE_CHECK
0235 template <class Dummy>
0236 struct disable_type_check
0237 {
0238 static bool value;
0239 };
0240 template <class Dummy>
0241 bool disable_type_check<Dummy>::value = false;
0242 #endif
0243 #ifndef BOOST_UBLAS_TYPE_CHECK_EPSILON
0244 #define BOOST_UBLAS_TYPE_CHECK_EPSILON (type_traits<real_type>::type_sqrt (std::numeric_limits<real_type>::epsilon ()))
0245 #endif
0246 #ifndef BOOST_UBLAS_TYPE_CHECK_MIN
0247 #define BOOST_UBLAS_TYPE_CHECK_MIN (type_traits<real_type>::type_sqrt ( (std::numeric_limits<real_type>::min) ()))
0248 #endif
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269 #if !(defined(BOOST_UBLAS_USE_INDEXING) || defined(BOOST_UBLAS_USE_ITERATING))
0270 #define BOOST_UBLAS_USE_INDEXING
0271 #endif
0272
0273
0274
0275
0276
0277
0278 #ifndef BOOST_UBLAS_BOUNDED_ARRAY_ALIGN
0279 #define BOOST_UBLAS_BOUNDED_ARRAY_ALIGN
0280 #endif
0281
0282
0283 #ifndef BOOST_UBLAS_NO_ELEMENT_PROXIES
0284
0285
0286
0287 #define BOOST_UBLAS_STRICT_VECTOR_SPARSE
0288 #define BOOST_UBLAS_STRICT_MATRIX_SPARSE
0289
0290 #define BOOST_UBLAS_STRICT_HERMITIAN
0291 #endif
0292
0293
0294
0295
0296
0297
0298
0299 #include <boost/numeric/ublas/fwd.hpp>
0300 #include <boost/numeric/ublas/detail/definitions.hpp>
0301
0302
0303 #endif
0304