aboutsummaryrefslogtreecommitdiffhomepage
path: root/tvmet-1.7.1/include/tvmet/tvmet.h
blob: abf7a7a0e02d5b84d5bffbc7c0b41159e46307c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/*
 * Tiny Vector Matrix Library
 * Dense Vector Matrix Libary of Tiny size using Expression Templates
 *
 * Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * $Id: tvmet.h,v 1.17 2004/11/04 16:28:32 opetzold Exp $
 */

#ifndef TVMET_H
#define TVMET_H

#include <tvmet/config.h>


/***********************************************************************
 * Compiler specifics
 ***********************************************************************/
#if defined(__GNUC__)
#  include <tvmet/config/config-gcc.h>
#endif

#if defined(__ICC)
#  include <tvmet/config/config-icc.h>
#endif

#if defined(__KCC)
#  include <tvmet/config/config-kcc.h>
#endif

#if defined(__PGI)
#  include <tvmet/config/config-pgi.h>
#endif

// vc7.1: 1310 and vc7.0 1300
#if defined(_MSC_VER) && (_MSC_VER >= 1310)
#  include <tvmet/config/config-vc71.h>
#endif

/*
 * other compiler specific stuff
 */

/**
 * \def TVMET_CXX_ALWAYS_INLINE
 * \brief Compiler specific stuff to force inline code if supported.
 *
 * Mainly, this declares the functions using g++'s
 * __attribute__((always_inline)). This features is enabled
 * on defined TVMET_OPTIMIZE.
 */
#if !defined(TVMET_CXX_ALWAYS_INLINE)
#define TVMET_CXX_ALWAYS_INLINE
#endif


/*
 * Complexity triggers, compiler and architecture specific.
 * If not defined, use defaults.
 */

/**
 * \def TVMET_COMPLEXITY_DEFAULT_TRIGGER
 * \brief Trigger for changing the matrix-product strategy.
 */
#if !defined(TVMET_COMPLEXITY_DEFAULT_TRIGGER)
#  define TVMET_COMPLEXITY_DEFAULT_TRIGGER	1000
#endif

/**
 * \def TVMET_COMPLEXITY_M_ASSIGN_TRIGGER
 * \brief Trigger for changing the matrix assign strategy.
 */
#if !defined(TVMET_COMPLEXITY_M_ASSIGN_TRIGGER)
#  define TVMET_COMPLEXITY_M_ASSIGN_TRIGGER	8*8
#endif

/**
 * \def TVMET_COMPLEXITY_MM_TRIGGER
 * \brief Trigger for changing the matrix-matrix-product strategy.
 * One strategy to build the matrix-matrix-product is to use
 * meta templates. The other to use looping.
 */
#if !defined(TVMET_COMPLEXITY_MM_TRIGGER)
#  define TVMET_COMPLEXITY_MM_TRIGGER		8*8
#endif

/**
 * \def TVMET_COMPLEXITY_V_ASSIGN_TRIGGER
 * \brief Trigger for changing the vector assign strategy.
 */
#if !defined(TVMET_COMPLEXITY_V_ASSIGN_TRIGGER)
#  define TVMET_COMPLEXITY_V_ASSIGN_TRIGGER	8
#endif

/**
 * \def TVMET_COMPLEXITY_MV_TRIGGER
 * \brief Trigger for changing the matrix-vector strategy.
 * One strategy to build the matrix-vector-product is to use
 * meta templates. The other to use looping.
 */
#if !defined(TVMET_COMPLEXITY_MV_TRIGGER)
#  define TVMET_COMPLEXITY_MV_TRIGGER		8*8
#endif


/***********************************************************************
 * other specials
 ***********************************************************************/
#if defined(TVMET_HAVE_IEEE_MATH)
#  define _ALL_SOURCE
#  if !defined(_XOPEN_SOURCE)
#    define _XOPEN_SOURCE
#  endif
#  if !defined(_XOPEN_SOURCE_EXTENDED)
#    define _XOPEN_SOURCE_EXTENDED
#  endif
#endif


/**
 * \def TVMET_DEBUG
 * This is defined if <code>DEBUG</code> is defined. This enables runtime error
 * bounds checking. If you compile %tvmet from another source directory
 * which defines <code>DEBUG</code>, then <code>TVMET_DEBUG</code> will be
 * <b>not</b> defined (This behavior differs from release less than 0.6.0).
 */


/**
 * \def TVMET_OPTIMIZE
 * If this is defined tvmet uses some compiler specific keywords.
 *  Mainly, this declares the functions using gcc's
 * <tt>__attribute__((always_inline))</tt>. This allows the
 * compiler to produce high efficient code even on less
 * optimization levels, like gcc's -O2 or even -O!
 * This is known to work with gcc v3.3.3 (and higher).
 * Using icc's v8 gnuc compatibility mode this may work, I've read
 * that it's using as an hint, this means you can have static inline
 * functions inside left.
 */
#if !defined(TVMET_OPTIMIZE)
#  undef  TVMET_CXX_ALWAYS_INLINE
#  define TVMET_CXX_ALWAYS_INLINE
#endif


/***********************************************************************
 * Namespaces
 ***********************************************************************/


/**
 * \namespace std
 * \brief Imported ISO/IEC 14882:1998 functions from std namespace.
 */

/**
 * \namespace tvmet
 * \brief The namespace for the Tiny %Vector %Matrix using Expression Templates Libary.
 */

/**
 * \namespace tvmet::meta
 * \brief Meta stuff inside here.
 */

/**
 * \namespace tvmet::loop
 * \brief Loop stuff inside here.
 */

/**
 * \namespace tvmet::element_wise
 * \brief Operators inside this namespace does elementwise operations.
 */

/**
 * \namespace tvmet::util
 * \brief Miscellaneous utility functions used.
 */


/***********************************************************************
 * forwards
 ***********************************************************************/
#if defined(TVMET_HAVE_COMPLEX)
namespace std {
  template<class T> class complex;
}
#endif


/***********************************************************************
 * other stuff
 ***********************************************************************/
#include <tvmet/TvmetBase.h>


#endif // TVMET_H

// Local Variables:
// mode:C++
// End:
// LocalWords:  gnuc gcc's icc's std