Eigen  3.2.92
Constants.h
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2015 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 DynamicIndex = 0xffffff;
27 
31 const int Infinity = -1;
32 
39 const int HugeCost = 10000;
40 
61 const unsigned int RowMajorBit = 0x1;
62 
65 const unsigned int EvalBeforeNestingBit = 0x2;
66 
70 const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
71 
88 const unsigned int PacketAccessBit = 0x8;
89 
90 #ifdef EIGEN_VECTORIZE
91 
100 #else
101 const unsigned int ActualPacketAccessBit = 0x0;
102 #endif
103 
124 const unsigned int LinearAccessBit = 0x10;
125 
138 const unsigned int LvalueBit = 0x20;
139 
149 const unsigned int DirectAccessBit = 0x40;
150 
161 const unsigned int AlignedBit = 0x80;
162 
163 const unsigned int NestByRefBit = 0x100;
164 
172 const unsigned int NoPreferredStorageOrderBit = 0x200;
173 
185 const unsigned int CompressedAccessBit = 0x400;
186 
187 
188 // list of flags that are inherited by default
189 const unsigned int HereditaryBits = RowMajorBit
190  | EvalBeforeNestingBit
192 
202 enum {
204  Lower=0x1,
206  Upper=0x2,
208  UnitDiag=0x4,
210  ZeroDiag=0x8,
223 };
224 
227 enum {
234  AlignedMask=255,
235  Aligned=16,
236 #if EIGEN_MAX_ALIGN_BYTES==128
237  AlignedMax = Aligned128
238 #elif EIGEN_MAX_ALIGN_BYTES==64
239  AlignedMax = Aligned64
240 #elif EIGEN_MAX_ALIGN_BYTES==32
241  AlignedMax = Aligned32
242 #elif EIGEN_MAX_ALIGN_BYTES==16
243  AlignedMax = Aligned16
244 #elif EIGEN_MAX_ALIGN_BYTES==8
245  AlignedMax = Aligned8
246 #elif EIGEN_MAX_ALIGN_BYTES==0
247  AlignedMax = Unaligned
248 #else
249 #error Invalid value for EIGEN_MAX_ALIGN_BYTES
250 #endif
251 };
252 
255 // FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
256 // TODO: find out what to do with that. Adapt the AlignedBox API ?
257 enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
258 
272 };
273 
276 enum {
278  DefaultTraversal,
280  LinearTraversal,
283  InnerVectorizedTraversal,
286  LinearVectorizedTraversal,
289  SliceVectorizedTraversal,
291  InvalidTraversal,
293  AllAtOnceTraversal
294 };
295 
298 enum {
300  NoUnrolling,
302  InnerUnrolling,
305  CompleteUnrolling
306 };
307 
310 enum {
311  Specialized,
312  BuiltIn
313 };
314 
318 enum {
320  ColMajor = 0,
322  RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
324  AutoAlign = 0, // FIXME --- clarify the situation
326  DontAlign = 0x2
327 };
328 
331 enum {
333  OnTheLeft = 1,
336 };
337 
338 /* the following used to be written as:
339  *
340  * struct NoChange_t {};
341  * namespace {
342  * EIGEN_UNUSED NoChange_t NoChange;
343  * }
344  *
345  * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
346  * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
347  * and we do not know how to get rid of them (bug 450).
348  */
349 
350 enum NoChange_t { NoChange };
351 enum Sequential_t { Sequential };
352 enum Default_t { Default };
353 
356 enum {
357  IsDense = 0,
358  IsSparse
359 };
360 
373 };
374 
379  Pivoting = 0x01,
381  NoPivoting = 0x02,
383  ComputeFullU = 0x04,
385  ComputeThinU = 0x08,
387  ComputeFullV = 0x10,
389  ComputeThinV = 0x20,
397  EigVecMask = EigenvaluesOnly | ComputeEigenvectors,
400  Ax_lBx = 0x100,
403  ABx_lx = 0x200,
406  BAx_lx = 0x400,
408  GenEigMask = Ax_lBx | ABx_lx | BAx_lx
409 };
410 
422 };
423 
424 #ifdef Success
425 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
426 #endif
427 
432  Success = 0,
440 };
441 
447  Isometry = 0x1,
450  Affine = 0x2,
454  Projective = 0x20
455 };
456 
459 namespace Architecture
460 {
461  enum Type {
462  Generic = 0x0,
463  SSE = 0x1,
464  AltiVec = 0x2,
465  VSX = 0x3,
466  NEON = 0x4,
467 #if defined EIGEN_VECTORIZE_SSE
468  Target = SSE
469 #elif defined EIGEN_VECTORIZE_ALTIVEC
470  Target = AltiVec
471 #elif defined EIGEN_VECTORIZE_VSX
472  Target = VSX
473 #elif defined EIGEN_VECTORIZE_NEON
474  Target = NEON
475 #else
476  Target = Generic
477 #endif
478  };
479 }
480 
483 enum { DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
484 
487 enum Action {GetAction, SetAction};
488 
490 struct Dense {};
491 
493 struct Sparse {};
494 
496 struct SolverStorage {};
497 
500 
503 
505 struct MatrixXpr {};
506 
508 struct ArrayXpr {};
509 
510 // An evaluator must define its shape. By default, it can be one of the following:
511 struct DenseShape { static std::string debugName() { return "DenseShape"; } };
512 struct SolverShape { static std::string debugName() { return "SolverShape"; } };
513 struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
514 struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
515 struct BandShape { static std::string debugName() { return "BandShape"; } };
516 struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
517 struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
518 struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
519 struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
520 struct SparseShape { static std::string debugName() { return "SparseShape"; } };
521 
522 namespace internal {
523 
524  // random access iterators based on coeff*() accessors.
525 struct IndexBased {};
526 
527 // evaluator based on iterators to access coefficients.
528 struct IteratorBased {};
529 
533 enum ComparisonName {
534  cmp_EQ = 0,
535  cmp_LT = 1,
536  cmp_LE = 2,
537  cmp_UNORD = 3,
538  cmp_NEQ = 4,
539  cmp_GT = 5,
540  cmp_GE = 6
541 };
542 } // end namespace internal
543 
544 } // end namespace Eigen
545 
546 #endif // EIGEN_CONSTANTS_H
Definition: Constants.h:208
Definition: Constants.h:368
Definition: Constants.h:383
AccessorLevels
Definition: Constants.h:364
const unsigned int CompressedAccessBit
Definition: Constants.h:185
CornerType
Definition: Constants.h:257
Definition: Constants.h:222
Definition: Constants.h:392
Definition: Constants.h:265
Definition: Constants.h:415
Definition: Constants.h:206
Definition: Constants.h:389
const unsigned int DirectAccessBit
Definition: Constants.h:149
Definition: Constants.h:218
const unsigned int LvalueBit
Definition: Constants.h:138
Definition: Constants.h:499
DirectionType
Definition: Constants.h:262
Definition: Constants.h:320
Definition: LDLT.h:16
Definition: Constants.h:230
Definition: Constants.h:233
Definition: Constants.h:447
Definition: Constants.h:403
Definition: Constants.h:406
Definition: Constants.h:417
Definition: Constants.h:324
const unsigned int RowMajorBit
Definition: Constants.h:61
Definition: Constants.h:210
Definition: Constants.h:228
const unsigned int PacketAccessBit
Definition: Constants.h:88
Definition: Constants.h:335
Definition: Constants.h:454
Definition: Constants.h:400
Definition: Constants.h:505
Definition: Constants.h:326
const unsigned int AlignedBit
Definition: Constants.h:161
Definition: Constants.h:366
Definition: Constants.h:452
Definition: Constants.h:322
Definition: Constants.h:419
Definition: Constants.h:395
TransformTraits
Definition: Constants.h:445
Definition: Constants.h:434
Definition: Constants.h:231
Definition: Constants.h:214
Definition: Constants.h:370
Definition: Constants.h:229
const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:70
Definition: Constants.h:493
Definition: Constants.h:220
Definition: Constants.h:439
Definition: Constants.h:372
Definition: Constants.h:432
Definition: Constants.h:268
Definition: Constants.h:271
Definition: Constants.h:204
Definition: Eigen_Colamd.h:54
Definition: Constants.h:496
Definition: Constants.h:235
QRPreconditioners
Definition: Constants.h:413
Definition: Constants.h:216
Definition: Constants.h:490
Definition: Constants.h:502
Definition: Constants.h:508
DecompositionOptions
Definition: Constants.h:377
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:65
Definition: Constants.h:387
Definition: Constants.h:385
const unsigned int ActualPacketAccessBit
Definition: Constants.h:99
ComputationInfo
Definition: Constants.h:430
Definition: Constants.h:450
Definition: Constants.h:436
const unsigned int LinearAccessBit
Definition: Constants.h:124
Definition: Constants.h:232
Definition: Constants.h:212
Definition: Constants.h:333
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:172