New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
config.hpp in vendors/XIOS/current/extern/boost/include/boost/numeric/ublas/detail – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/numeric/ublas/detail/config.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 7.7 KB
Line 
1//
2//  Copyright (c) 2000-2002
3//  Joerg Walter, Mathias Koch
4//
5//  Distributed under the Boost Software License, Version 1.0. (See
6//  accompanying file LICENSE_1_0.txt or copy at
7//  http://www.boost.org/LICENSE_1_0.txt)
8//
9//  The authors gratefully acknowledge the support of
10//  GeNeSys mbH & Co. KG in producing this work.
11//
12
13#ifndef _BOOST_UBLAS_CONFIG_
14#define _BOOST_UBLAS_CONFIG_
15
16#include <cassert>
17#include <cstddef>
18#include <algorithm>
19#include <limits>
20
21#include <boost/config.hpp>
22#include <boost/static_assert.hpp>
23#include <boost/noncopyable.hpp>
24#include <boost/mpl/if.hpp>
25#include <boost/mpl/and.hpp>
26#include <boost/type_traits/is_same.hpp>
27#include <boost/type_traits/is_convertible.hpp>
28#include <boost/type_traits/is_const.hpp>
29#include <boost/type_traits/remove_reference.hpp>
30
31
32// Microsoft Visual C++
33#if defined (BOOST_MSVC) && ! defined (BOOST_STRICT_CONFIG)
34
35// Version 6.0 and 7.0
36#if BOOST_MSVC <= 1300
37#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
38#endif
39
40// Version 7.1
41#if BOOST_MSVC == 1310
42// One of these workarounds is needed for MSVC 7.1 AFAIK
43// (thanks to John Maddock and Martin Lauer).
44#if !(defined(BOOST_UBLAS_NO_NESTED_CLASS_RELATION) || defined(BOOST_UBLAS_MSVC_NESTED_CLASS_RELATION))
45#define BOOST_UBLAS_NO_NESTED_CLASS_RELATION
46#endif
47
48#endif
49
50#endif
51
52
53// GNU Compiler Collection
54#if defined (__GNUC__) && ! defined (BOOST_STRICT_CONFIG)
55
56#if __GNUC__ >= 4 || (__GNUC__ >= 3 && __GNUC_MINOR__ >= 4)
57// Specified by ABI definition see GCC bug id 9982
58#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
59#endif
60
61#if __GNUC__ < 3
62#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
63#endif
64
65#endif
66
67
68// Intel Compiler
69#if defined (BOOST_INTEL) && ! defined (BOOST_STRICT_CONFIG)
70
71#if defined (BOOST_INTEL_LINUX) && (BOOST_INTEL_LINUX >= 800)
72// By inspection of compiler results
73#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
74#endif
75
76#if (BOOST_INTEL < 700)
77#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
78#endif
79
80// Define swap for index_pair and triple.
81#if (BOOST_INTEL <= 800)
82namespace boost { namespace numeric { namespace ublas {
83    template<class C, class IC>
84    class indexed_iterator;
85
86    template<class V>
87    class index_pair;
88    template<class M>
89    class index_triple;
90}}}
91
92namespace std {
93    template<class V>
94    inline
95    void swap (boost::numeric::ublas::index_pair<V> i1, boost::numeric::ublas::index_pair<V> i2) {
96        i1.swap (i2);
97    }
98    template<class M>
99    inline
100    void swap (boost::numeric::ublas::index_triple<M> i1, boost::numeric::ublas::index_triple<M> i2) {
101        i1.swap (i2);
102    }
103    // iter_swap also needed for ICC on Itanium?
104    template<class C, class IC>
105    inline
106    void iter_swap (boost::numeric::ublas::indexed_iterator<C, IC> it1,
107                    boost::numeric::ublas::indexed_iterator<C, IC> it2) {
108        swap (*it1, *it2);
109    }
110}
111#endif
112
113#endif
114
115
116// Comeau compiler - thanks to Kresimir Fresl
117#if defined (__COMO__) && ! defined (BOOST_STRICT_CONFIG)
118
119// Missing std::abs overloads for float types in <cmath> are in <cstdlib>
120#if defined(__LIBCOMO__) && (__LIBCOMO_VERSION__ <= 31)
121#include <cstdlib>
122#endif
123
124#endif
125
126
127//  HP aCC C++ compiler
128#if defined (__HP_aCC) && ! defined (BOOST_STRICT_CONFIG)
129#  if (__HP_aCC >= 60000 )
130#    define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
131#endif
132#endif
133
134
135//  SGI MIPSpro C++ compiler
136#if defined (__sgi) && ! defined (BOOST_STRICT_CONFIG)
137
138// Missing std::abs overloads for float types in <cmath> are in <cstdlib>
139// This test should be library version specific.
140#include <cstdlib>
141
142#if __COMPILER_VERSION >=650
143// By inspection of compiler results - thanks to Peter Schmitteckert
144#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
145#endif
146
147#endif
148
149
150// Metrowerks Codewarrior
151#if defined (__MWERKS__) && ! defined (BOOST_STRICT_CONFIG)
152
153// 8.x
154#if __MWERKS__ <= 0x3003
155#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
156#endif
157
158#endif
159
160
161// Detect other compilers with serious defects - override by defineing BOOST_UBLAS_UNSUPPORTED_COMPILER=0
162#ifndef BOOST_UBLAS_UNSUPPORTED_COMPILER
163#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STDC_NAMESPACE)
164#define BOOST_UBLAS_UNSUPPORTED_COMPILER 1
165#endif
166#endif
167
168// Cannot continue with an unsupported compiler
169#if defined(BOOST_UBLAS_UNSUPPORTED_COMPILER) && (BOOST_UBLAS_UNSUPPORTED_COMPILER != 0)
170#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.
171#endif
172
173
174
175// Enable performance options in RELEASE mode
176#if defined (NDEBUG) || defined (BOOST_UBLAS_NDEBUG)
177
178#ifndef BOOST_UBLAS_INLINE
179#define BOOST_UBLAS_INLINE inline
180#endif
181
182// Do not check sizes!
183#define BOOST_UBLAS_USE_FAST_SAME
184
185// NO runtime error checks with BOOST_UBLAS_CHECK macro
186#ifndef BOOST_UBLAS_CHECK_ENABLE
187#define BOOST_UBLAS_CHECK_ENABLE 0
188#endif
189
190// NO type compatibility numeric checks
191#ifndef BOOST_UBLAS_TYPE_CHECK
192#define BOOST_UBLAS_TYPE_CHECK 0
193#endif
194
195
196// Disable performance options in DEBUG mode
197#else
198
199#ifndef BOOST_UBLAS_INLINE
200#define BOOST_UBLAS_INLINE
201#endif
202
203// Enable runtime error checks with BOOST_UBLAS_CHECK macro. Check bounds etc
204#ifndef BOOST_UBLAS_CHECK_ENABLE
205#define BOOST_UBLAS_CHECK_ENABLE 1
206#endif
207
208// Type compatibiltity numeric checks
209#ifndef BOOST_UBLAS_TYPE_CHECK
210#define BOOST_UBLAS_TYPE_CHECK 1
211#endif
212
213#endif
214
215
216/*
217 * Type compatibility checks
218 *  Control type compatibility numeric runtime checks for non dense matrices.
219 *  Require additional storage and complexity
220 */
221#if BOOST_UBLAS_TYPE_CHECK
222template <class Dummy>
223struct disable_type_check
224{
225    static bool value;
226};
227template <class Dummy>
228bool disable_type_check<Dummy>::value = false;
229#endif
230#ifndef BOOST_UBLAS_TYPE_CHECK_EPSILON
231#define BOOST_UBLAS_TYPE_CHECK_EPSILON (type_traits<real_type>::type_sqrt (std::numeric_limits<real_type>::epsilon ()))
232#endif
233#ifndef BOOST_UBLAS_TYPE_CHECK_MIN
234#define BOOST_UBLAS_TYPE_CHECK_MIN (type_traits<real_type>::type_sqrt ( (std::numeric_limits<real_type>::min) ()))
235#endif
236
237
238/*
239 * General Configuration
240 */
241
242// Proxy shortcuts overload the alreadly heavily over used operator ()
243//#define BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS
244
245// In order to simplify debugging is is possible to simplify expression template
246// so they are restricted to a single operation
247// #define BOOST_UBLAS_SIMPLE_ET_DEBUG
248
249// Use invariant hoisting.
250// #define BOOST_UBLAS_USE_INVARIANT_HOISTING
251
252// Use Duff's device in element access loops
253// #define BOOST_UBLAS_USE_DUFF_DEVICE
254
255// Choose evaluation method for dense vectors and matrices
256#if !(defined(BOOST_UBLAS_USE_INDEXING) || defined(BOOST_UBLAS_USE_ITERATING))
257#define BOOST_UBLAS_USE_INDEXING
258#endif
259// #define BOOST_UBLAS_ITERATOR_THRESHOLD 0
260
261// Use indexed iterators - unsupported implementation experiment
262// #define BOOST_UBLAS_USE_INDEXED_ITERATOR
263
264// Alignment of bounded_array type
265#ifndef BOOST_UBLAS_BOUNDED_ARRAY_ALIGN
266#define BOOST_UBLAS_BOUNDED_ARRAY_ALIGN
267#endif
268
269// Enable different sparse element proxies
270#ifndef BOOST_UBLAS_NO_ELEMENT_PROXIES
271// Sparse proxies prevent reference invalidation problems in expressions such as:
272// a [1] = a [0] = 1        Thanks to Marc Duflot for spotting this.
273// #define BOOST_UBLAS_STRICT_MAP_ARRAY
274#define BOOST_UBLAS_STRICT_VECTOR_SPARSE
275#define BOOST_UBLAS_STRICT_MATRIX_SPARSE
276// Hermitian matrices use element proxies to allow assignment to conjugate triangle
277#define BOOST_UBLAS_STRICT_HERMITIAN
278#endif
279
280// Define to configure special settings for reference returning members
281// #define BOOST_UBLAS_REFERENCE_CONST_MEMBER
282// #define BOOST_UBLAS_PROXY_CONST_MEMBER
283
284
285// Include type declerations and functions
286#include <boost/numeric/ublas/fwd.hpp>
287#include <boost/numeric/ublas/detail/definitions.hpp>
288
289
290#endif
Note: See TracBrowser for help on using the repository browser.