Constants.h
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_CONSTANTS_H
12 #define EIGEN_CONSTANTS_H
13 
14 namespace Eigen {
15 
21 const int Dynamic = -1;
22 
26 const int Infinity = -1;
27 
48 const unsigned int RowMajorBit = 0x1;
49 
53 const unsigned int EvalBeforeNestingBit = 0x2;
54 
58 const unsigned int EvalBeforeAssigningBit = 0x4;
59 
76 const unsigned int PacketAccessBit = 0x8;
77 
78 #ifdef EIGEN_VECTORIZE
79 
88 #else
89 const unsigned int ActualPacketAccessBit = 0x0;
90 #endif
91 
112 const unsigned int LinearAccessBit = 0x10;
113 
126 const unsigned int LvalueBit = 0x20;
127 
137 const unsigned int DirectAccessBit = 0x40;
138 
142 const unsigned int AlignedBit = 0x80;
143 
144 const unsigned int NestByRefBit = 0x100;
145 
146 // list of flags that are inherited by default
147 const unsigned int HereditaryBits = RowMajorBit
150 
160 enum {
162  Lower=0x1,
164  Upper=0x2,
166  UnitDiag=0x4,
168  ZeroDiag=0x8,
181 };
182 
185 enum {
190 };
191 
194 // FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
195 // TODO: find out what to do with that. Adapt the AlignedBox API ?
196 enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
197 
211 };
212 
215 enum {
217  DefaultTraversal,
219  LinearTraversal,
222  InnerVectorizedTraversal,
225  LinearVectorizedTraversal,
228  SliceVectorizedTraversal,
230  InvalidTraversal
231 };
232 
235 enum {
237  NoUnrolling,
239  InnerUnrolling,
242  CompleteUnrolling
243 };
244 
247 enum {
248  Specialized,
249  BuiltIn
250 };
251 
255 enum {
257  ColMajor = 0,
259  RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
261  AutoAlign = 0, // FIXME --- clarify the situation
263  DontAlign = 0x2
264 };
265 
268 enum {
270  OnTheLeft = 1,
273 };
274 
275 /* the following used to be written as:
276  *
277  * struct NoChange_t {};
278  * namespace {
279  * EIGEN_UNUSED NoChange_t NoChange;
280  * }
281  *
282  * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
283  * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
284  * and we do not know how to get rid of them (bug 450).
285  */
286 
287 enum NoChange_t { NoChange };
288 enum Sequential_t { Sequential };
289 enum Default_t { Default };
290 
293 enum {
294  IsDense = 0,
295  IsSparse
296 };
297 
310 };
311 
316  Pivoting = 0x01,
318  NoPivoting = 0x02,
320  ComputeFullU = 0x04,
322  ComputeThinU = 0x08,
324  ComputeFullV = 0x10,
326  ComputeThinV = 0x20,
334  EigVecMask = EigenvaluesOnly | ComputeEigenvectors,
337  Ax_lBx = 0x100,
340  ABx_lx = 0x200,
343  BAx_lx = 0x400,
345  GenEigMask = Ax_lBx | ABx_lx | BAx_lx
346 };
347 
359 };
360 
361 #ifdef Success
362 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
363 #endif
364 
369  Success = 0,
377 };
378 
384  Isometry = 0x1,
387  Affine = 0x2,
391  Projective = 0x20
392 };
393 
396 namespace Architecture
397 {
398  enum Type {
399  Generic = 0x0,
400  SSE = 0x1,
401  AltiVec = 0x2,
402 #if defined EIGEN_VECTORIZE_SSE
403  Target = SSE
404 #elif defined EIGEN_VECTORIZE_ALTIVEC
405  Target = AltiVec
406 #else
407  Target = Generic
408 #endif
409  };
410 }
411 
414 enum { CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
415 
418 enum Action {GetAction, SetAction};
419 
421 struct Dense {};
422 
424 struct MatrixXpr {};
425 
427 struct ArrayXpr {};
428 
429 } // end namespace Eigen
430 
431 #endif // EIGEN_CONSTANTS_H