Constants.h
Go to the documentation of this file.
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 // Copyright (C) 2020, Arm Limited and Contributors
7 //
8 // This Source Code Form is subject to the terms of the Mozilla
9 // Public License v. 2.0. If a copy of the MPL was not distributed
10 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12 #ifndef EIGEN_CONSTANTS_H
13 #define EIGEN_CONSTANTS_H
14 
15 #include "../InternalHeaderCheck.h"
16 
17 namespace Eigen {
18 
24 const int Dynamic = -1;
25 
29 const int DynamicIndex = 0xffffff;
30 
33 const int UndefinedIncr = 0xfffffe;
34 
38 const int Infinity = -1;
39 
46 const int HugeCost = 10000;
47 
68 const unsigned int RowMajorBit = 0x1;
69 
72 const unsigned int EvalBeforeNestingBit = 0x2;
73 
78 const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
79 
96 const unsigned int PacketAccessBit = 0x8;
97 
98 #ifdef EIGEN_VECTORIZE
108 #else
109 const unsigned int ActualPacketAccessBit = 0x0;
110 #endif
111 
132 const unsigned int LinearAccessBit = 0x10;
133 
146 const unsigned int LvalueBit = 0x20;
147 
157 const unsigned int DirectAccessBit = 0x40;
158 
169 EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
170 
171 const unsigned int NestByRefBit = 0x100;
172 
180 const unsigned int NoPreferredStorageOrderBit = 0x200;
181 
193 const unsigned int CompressedAccessBit = 0x400;
194 
195 
196 // list of flags that are inherited by default
197 const unsigned int HereditaryBits = RowMajorBit
199 
209 enum UpLoType {
211  Lower=0x1,
213  Upper=0x2,
215  UnitDiag=0x4,
217  ZeroDiag=0x8,
229  Symmetric=0x20
230 };
231 
242  Aligned=16,
243 #if EIGEN_MAX_ALIGN_BYTES==128
245 #elif EIGEN_MAX_ALIGN_BYTES==64
247 #elif EIGEN_MAX_ALIGN_BYTES==32
249 #elif EIGEN_MAX_ALIGN_BYTES==16
251 #elif EIGEN_MAX_ALIGN_BYTES==8
253 #elif EIGEN_MAX_ALIGN_BYTES==0
255 #else
256 #error Invalid value for EIGEN_MAX_ALIGN_BYTES
257 #endif
258 };
259 
273 };
274 
295 };
296 
307 };
308 
313  BuiltIn
314 };
315 
321  ColMajor = 0,
323  RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
325  AutoAlign = 0, // FIXME --- clarify the situation
327  DontAlign = 0x2
328 };
329 
332 enum SideType {
336  OnTheRight = 2
337 };
338 
348 };
349 
350 /* the following used to be written as:
351  *
352  * struct NoChange_t {};
353  * namespace {
354  * EIGEN_UNUSED NoChange_t NoChange;
355  * }
356  *
357  * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
358  * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
359  * and we do not know how to get rid of them (bug 450).
360  */
361 
365 
369  IsDense = 0,
370  IsSparse
371 };
372 
385 };
386 
391  Pivoting = 0x01,
393  NoPivoting = 0x02,
395  ComputeFullU = 0x04,
397  ComputeThinU = 0x08,
399  ComputeFullV = 0x10,
401  ComputeThinV = 0x20,
412  Ax_lBx = 0x100,
415  ABx_lx = 0x200,
418  BAx_lx = 0x400,
421 };
422 
436 };
437 
438 #ifdef Success
439 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
440 #endif
441 
446  Success = 0,
453  InvalidInput = 3
454 };
455 
461  Isometry = 0x1,
464  Affine = 0x2,
468  Projective = 0x20
469 };
470 
473 namespace Architecture
474 {
475  enum Type {
476  Generic = 0x0,
477  SSE = 0x1,
478  AltiVec = 0x2,
479  VSX = 0x3,
480  NEON = 0x4,
481  MSA = 0x5,
482  SVE = 0x6,
483 #if defined EIGEN_VECTORIZE_SSE
484  Target = SSE
485 #elif defined EIGEN_VECTORIZE_ALTIVEC
486  Target = AltiVec
487 #elif defined EIGEN_VECTORIZE_VSX
488  Target = VSX
489 #elif defined EIGEN_VECTORIZE_NEON
490  Target = NEON
491 #elif defined EIGEN_VECTORIZE_SVE
492  Target = SVE
493 #elif defined EIGEN_VECTORIZE_MSA
494  Target = MSA
495 #else
496  Target = Generic
497 #endif
498  };
499 }
500 
505 
509 
511 struct Dense {};
512 
514 struct Sparse {};
515 
517 struct SolverStorage {};
518 
521 
524 
526 struct MatrixXpr {};
527 
529 struct ArrayXpr {};
530 
531 // An evaluator must define its shape. By default, it can be one of the following:
532 struct DenseShape { static std::string debugName() { return "DenseShape"; } };
533 struct SolverShape { static std::string debugName() { return "SolverShape"; } };
534 struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
535 struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
536 struct SkewSymmetricShape { static std::string debugName() { return "SkewSymmetricShape"; } };
537 struct BandShape { static std::string debugName() { return "BandShape"; } };
538 struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
539 struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
540 struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
541 struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
542 struct SparseShape { static std::string debugName() { return "SparseShape"; } };
543 
544 namespace internal {
545 
546  // random access iterators based on coeff*() accessors.
547 struct IndexBased {};
548 
549 // evaluator based on iterators to access coefficients.
550 struct IteratorBased {};
551 
555 enum ComparisonName : unsigned int {
556  cmp_EQ = 0,
557  cmp_LT = 1,
558  cmp_LE = 2,
560  cmp_NEQ = 4,
561  cmp_GT = 5,
562  cmp_GE = 6
563 };
564 } // end namespace internal
565 
566 } // end namespace Eigen
567 
568 #endif // EIGEN_CONSTANTS_H
#define EIGEN_DEPRECATED
Definition: Macros.h:923
UpLoType
Definition: Constants.h:209
AlignmentType
Definition: Constants.h:234
QRPreconditioners
Definition: Constants.h:425
NaNPropagationOptions
Definition: Constants.h:341
ComputationInfo
Definition: Constants.h:444
AccessorLevels
Definition: Constants.h:376
StorageOptions
Definition: Constants.h:319
SideType
Definition: Constants.h:332
DirectionType
Definition: Constants.h:263
DecompositionOptions
Definition: Constants.h:389
TransformTraits
Definition: Constants.h:459
@ StrictlyLower
Definition: Constants.h:223
@ UnitDiag
Definition: Constants.h:215
@ StrictlyUpper
Definition: Constants.h:225
@ UnitLower
Definition: Constants.h:219
@ ZeroDiag
Definition: Constants.h:217
@ SelfAdjoint
Definition: Constants.h:227
@ Symmetric
Definition: Constants.h:229
@ UnitUpper
Definition: Constants.h:221
@ Lower
Definition: Constants.h:211
@ Upper
Definition: Constants.h:213
@ Aligned64
Definition: Constants.h:239
@ AlignedMask
Definition: Constants.h:241
@ Unaligned
Definition: Constants.h:235
@ Aligned128
Definition: Constants.h:240
@ Aligned32
Definition: Constants.h:238
@ Aligned8
Definition: Constants.h:236
@ Aligned16
Definition: Constants.h:237
@ AlignedMax
Definition: Constants.h:254
@ Aligned
Definition: Constants.h:242
@ NoQRPreconditioner
Definition: Constants.h:429
@ DisableQRDecomposition
Definition: Constants.h:435
@ HouseholderQRPreconditioner
Definition: Constants.h:431
@ ColPivHouseholderQRPreconditioner
Definition: Constants.h:427
@ FullPivHouseholderQRPreconditioner
Definition: Constants.h:433
@ PropagateNaN
Definition: Constants.h:345
@ PropagateNumbers
Definition: Constants.h:347
@ PropagateFast
Definition: Constants.h:343
@ NumericalIssue
Definition: Constants.h:448
@ InvalidInput
Definition: Constants.h:453
@ Success
Definition: Constants.h:446
@ NoConvergence
Definition: Constants.h:450
@ DirectAccessors
Definition: Constants.h:382
@ ReadOnlyAccessors
Definition: Constants.h:378
@ WriteAccessors
Definition: Constants.h:380
@ DirectWriteAccessors
Definition: Constants.h:384
@ ColMajor
Definition: Constants.h:321
@ DontAlign
Definition: Constants.h:327
@ RowMajor
Definition: Constants.h:323
@ AutoAlign
Definition: Constants.h:325
@ OnTheLeft
Definition: Constants.h:334
@ OnTheRight
Definition: Constants.h:336
@ BothDirections
Definition: Constants.h:272
@ Horizontal
Definition: Constants.h:269
@ Vertical
Definition: Constants.h:266
@ GenEigMask
Definition: Constants.h:420
@ ComputeFullV
Definition: Constants.h:399
@ ComputeThinV
Definition: Constants.h:401
@ EigVecMask
Definition: Constants.h:409
@ Ax_lBx
Definition: Constants.h:412
@ ComputeEigenvectors
Definition: Constants.h:407
@ BAx_lx
Definition: Constants.h:418
@ ABx_lx
Definition: Constants.h:415
@ Pivoting
Definition: Constants.h:391
@ ComputeFullU
Definition: Constants.h:395
@ ComputeThinU
Definition: Constants.h:397
@ NoPivoting
Definition: Constants.h:393
@ EigenvaluesOnly
Definition: Constants.h:404
@ Affine
Definition: Constants.h:464
@ Projective
Definition: Constants.h:468
@ AffineCompact
Definition: Constants.h:466
@ Isometry
Definition: Constants.h:461
const unsigned int ActualPacketAccessBit
Definition: Constants.h:107
EIGEN_DEPRECATED const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:78
const unsigned int PacketAccessBit
Definition: Constants.h:96
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:180
const unsigned int LinearAccessBit
Definition: Constants.h:132
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:72
const unsigned int DirectAccessBit
Definition: Constants.h:157
EIGEN_DEPRECATED const unsigned int AlignedBit
Definition: Constants.h:169
const unsigned int LvalueBit
Definition: Constants.h:146
const unsigned int RowMajorBit
Definition: Constants.h:68
const unsigned int CompressedAccessBit
Definition: Constants.h:193
: InteropHeaders
Definition: Core:139
const int UndefinedIncr
Definition: Constants.h:33
ProductImplType
Definition: Constants.h:504
@ GemvProduct
Definition: Constants.h:504
@ LazyProduct
Definition: Constants.h:504
@ InnerProduct
Definition: Constants.h:504
@ DefaultProduct
Definition: Constants.h:504
@ CoeffBasedProductMode
Definition: Constants.h:504
@ OuterProduct
Definition: Constants.h:504
@ AliasFreeProduct
Definition: Constants.h:504
@ GemmProduct
Definition: Constants.h:504
@ LazyCoeffBasedProductMode
Definition: Constants.h:504
const unsigned int HereditaryBits
Definition: Constants.h:197
const unsigned int NestByRefBit
Definition: Constants.h:171
const int HugeCost
Definition: Constants.h:46
@ GetAction
Definition: Constants.h:508
@ SetAction
Definition: Constants.h:508
TraversalType
Definition: Constants.h:277
@ InnerVectorizedTraversal
Definition: Constants.h:284
@ LinearVectorizedTraversal
Definition: Constants.h:287
@ DefaultTraversal
Definition: Constants.h:279
@ SliceVectorizedTraversal
Definition: Constants.h:290
@ LinearTraversal
Definition: Constants.h:281
@ AllAtOnceTraversal
Definition: Constants.h:294
@ InvalidTraversal
Definition: Constants.h:292
NoChange_t
Definition: Constants.h:362
@ NoChange
Definition: Constants.h:362
AmbiVectorMode
Definition: Constants.h:368
@ IsDense
Definition: Constants.h:369
@ IsSparse
Definition: Constants.h:370
Default_t
Definition: Constants.h:364
@ Default
Definition: Constants.h:364
const int DynamicIndex
Definition: Constants.h:29
const int Infinity
Definition: Constants.h:38
SpecializedType
Definition: Constants.h:311
@ Specialized
Definition: Constants.h:312
@ BuiltIn
Definition: Constants.h:313
UnrollingType
Definition: Constants.h:299
@ InnerUnrolling
Definition: Constants.h:303
@ CompleteUnrolling
Definition: Constants.h:306
@ NoUnrolling
Definition: Constants.h:301
Sequential_t
Definition: Constants.h:363
@ Sequential
Definition: Constants.h:363
const int Dynamic
Definition: Constants.h:24
static std::string debugName()
Definition: Constants.h:537
static std::string debugName()
Definition: Constants.h:532
static std::string debugName()
Definition: Constants.h:535
static std::string debugName()
Definition: Constants.h:534
static std::string debugName()
Definition: Constants.h:540
static std::string debugName()
Definition: Constants.h:539
static std::string debugName()
Definition: Constants.h:536
static std::string debugName()
Definition: Constants.h:533
static std::string debugName()
Definition: Constants.h:542
static std::string debugName()
Definition: Constants.h:541
static std::string debugName()
Definition: Constants.h:538