Eigen  3.2.91
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 
53 const unsigned int RowMajorBit = 0x1;
54 
57 const unsigned int EvalBeforeNestingBit = 0x2;
58 
62 const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
63 
80 const unsigned int PacketAccessBit = 0x8;
81 
82 #ifdef EIGEN_VECTORIZE
83 
92 #else
93 const unsigned int ActualPacketAccessBit = 0x0;
94 #endif
95 
116 const unsigned int LinearAccessBit = 0x10;
117 
130 const unsigned int LvalueBit = 0x20;
131 
141 const unsigned int DirectAccessBit = 0x40;
142 
153 const unsigned int AlignedBit = 0x80;
154 
155 const unsigned int NestByRefBit = 0x100;
156 
164 const unsigned int NoPreferredStorageOrderBit = 0x200;
165 
177 const unsigned int CompressedAccessBit = 0x400;
178 
179 
180 // list of flags that are inherited by default
181 const unsigned int HereditaryBits = RowMajorBit
182  | EvalBeforeNestingBit
184 
194 enum {
196  Lower=0x1,
198  Upper=0x2,
200  UnitDiag=0x4,
202  ZeroDiag=0x8,
215 };
216 
219 enum {
226  AlignedMask=255,
227  Aligned=16,
228 #if EIGEN_MAX_ALIGN_BYTES==128
229  AlignedMax = Aligned128
230 #elif EIGEN_MAX_ALIGN_BYTES==64
231  AlignedMax = Aligned64
232 #elif EIGEN_MAX_ALIGN_BYTES==32
233  AlignedMax = Aligned32
234 #elif EIGEN_MAX_ALIGN_BYTES==16
235  AlignedMax = Aligned16
236 #elif EIGEN_MAX_ALIGN_BYTES==8
237  AlignedMax = Aligned8
238 #elif EIGEN_MAX_ALIGN_BYTES==0
239  AlignedMax = Unaligned
240 #else
241 #error Invalid value for EIGEN_MAX_ALIGN_BYTES
242 #endif
243 };
244 
247 // FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
248 // TODO: find out what to do with that. Adapt the AlignedBox API ?
249 enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
250 
264 };
265 
268 enum {
270  DefaultTraversal,
272  LinearTraversal,
275  InnerVectorizedTraversal,
278  LinearVectorizedTraversal,
281  SliceVectorizedTraversal,
283  InvalidTraversal,
285  AllAtOnceTraversal
286 };
287 
290 enum {
292  NoUnrolling,
294  InnerUnrolling,
297  CompleteUnrolling
298 };
299 
302 enum {
303  Specialized,
304  BuiltIn
305 };
306 
310 enum {
312  ColMajor = 0,
314  RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
316  AutoAlign = 0, // FIXME --- clarify the situation
318  DontAlign = 0x2
319 };
320 
323 enum {
325  OnTheLeft = 1,
328 };
329 
330 /* the following used to be written as:
331  *
332  * struct NoChange_t {};
333  * namespace {
334  * EIGEN_UNUSED NoChange_t NoChange;
335  * }
336  *
337  * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
338  * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
339  * and we do not know how to get rid of them (bug 450).
340  */
341 
342 enum NoChange_t { NoChange };
343 enum Sequential_t { Sequential };
344 enum Default_t { Default };
345 
348 enum {
349  IsDense = 0,
350  IsSparse
351 };
352 
365 };
366 
371  Pivoting = 0x01,
373  NoPivoting = 0x02,
375  ComputeFullU = 0x04,
377  ComputeThinU = 0x08,
379  ComputeFullV = 0x10,
381  ComputeThinV = 0x20,
389  EigVecMask = EigenvaluesOnly | ComputeEigenvectors,
392  Ax_lBx = 0x100,
395  ABx_lx = 0x200,
398  BAx_lx = 0x400,
400  GenEigMask = Ax_lBx | ABx_lx | BAx_lx
401 };
402 
414 };
415 
416 #ifdef Success
417 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
418 #endif
419 
424  Success = 0,
432 };
433 
439  Isometry = 0x1,
442  Affine = 0x2,
446  Projective = 0x20
447 };
448 
451 namespace Architecture
452 {
453  enum Type {
454  Generic = 0x0,
455  SSE = 0x1,
456  AltiVec = 0x2,
457  VSX = 0x3,
458  NEON = 0x4,
459 #if defined EIGEN_VECTORIZE_SSE
460  Target = SSE
461 #elif defined EIGEN_VECTORIZE_ALTIVEC
462  Target = AltiVec
463 #elif defined EIGEN_VECTORIZE_VSX
464  Target = VSX
465 #elif defined EIGEN_VECTORIZE_NEON
466  Target = NEON
467 #else
468  Target = Generic
469 #endif
470  };
471 }
472 
475 enum { DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
476 
479 enum Action {GetAction, SetAction};
480 
482 struct Dense {};
483 
485 struct Sparse {};
486 
489 
492 
494 struct MatrixXpr {};
495 
497 struct ArrayXpr {};
498 
499 // An evaluator must define its shape. By default, it can be one of the following:
500 struct DenseShape { static std::string debugName() { return "DenseShape"; } };
501 struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
502 struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
503 struct BandShape { static std::string debugName() { return "BandShape"; } };
504 struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
505 struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
506 struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
507 struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
508 struct SparseShape { static std::string debugName() { return "SparseShape"; } };
509 
510 namespace internal {
511 
512  // random access iterators based on coeff*() accessors.
513 struct IndexBased {};
514 
515 // evaluator based on iterators to access coefficients.
516 struct IteratorBased {};
517 
521 enum ComparisonName {
522  cmp_EQ = 0,
523  cmp_LT = 1,
524  cmp_LE = 2,
525  cmp_UNORD = 3,
526  cmp_NEQ = 4
527 };
528 } // end namespace internal
529 
530 } // end namespace Eigen
531 
532 #endif // EIGEN_CONSTANTS_H
Definition: Constants.h:360
Definition: Constants.h:375
AccessorLevels
Definition: Constants.h:356
Definition: Constants.h:314
Definition: Constants.h:204
const unsigned int CompressedAccessBit
Definition: Constants.h:177
CornerType
Definition: Constants.h:249
Definition: Constants.h:384
Definition: Constants.h:257
Definition: Constants.h:407
Definition: Constants.h:225
Definition: Constants.h:381
const unsigned int DirectAccessBit
Definition: Constants.h:141
Definition: Constants.h:196
Definition: Constants.h:220
Definition: Constants.h:202
const unsigned int LvalueBit
Definition: Constants.h:130
Definition: Constants.h:488
Definition: Constants.h:214
DirectionType
Definition: Constants.h:254
Definition: LDLT.h:16
Definition: Constants.h:439
Definition: Constants.h:395
Definition: Constants.h:327
Definition: Constants.h:398
Definition: Constants.h:409
const unsigned int RowMajorBit
Definition: Constants.h:53
Definition: Constants.h:318
const unsigned int PacketAccessBit
Definition: Constants.h:80
Definition: Constants.h:446
Definition: Constants.h:392
Definition: Constants.h:494
const unsigned int AlignedBit
Definition: Constants.h:153
Definition: Constants.h:198
Definition: Constants.h:358
Definition: Constants.h:444
Definition: Constants.h:223
Definition: Constants.h:411
Definition: Constants.h:387
TransformTraits
Definition: Constants.h:437
Definition: Constants.h:426
Definition: Constants.h:362
Definition: Constants.h:210
const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:62
Definition: Constants.h:485
Definition: Constants.h:224
Definition: Constants.h:222
Definition: Constants.h:431
Definition: Constants.h:364
Definition: Constants.h:424
Definition: Constants.h:260
Definition: Constants.h:263
Definition: Constants.h:200
Definition: Eigen_Colamd.h:54
Definition: Constants.h:208
Definition: Constants.h:316
Definition: Constants.h:206
QRPreconditioners
Definition: Constants.h:405
Definition: Constants.h:482
Definition: Constants.h:491
Definition: Constants.h:497
Definition: Constants.h:221
Definition: Constants.h:312
DecompositionOptions
Definition: Constants.h:369
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:57
Definition: Constants.h:325
Definition: Constants.h:379
Definition: Constants.h:377
const unsigned int ActualPacketAccessBit
Definition: Constants.h:91
Definition: Constants.h:227
ComputationInfo
Definition: Constants.h:422
Definition: Constants.h:442
Definition: Constants.h:428
const unsigned int LinearAccessBit
Definition: Constants.h:116
Definition: Constants.h:212
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:164