Eigen  3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)
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 // 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 
77 EIGEN_DEPRECATED
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 
241  AlignedMask=255,
242  Aligned=16,
243 #if EIGEN_MAX_ALIGN_BYTES==128
244  AlignedMax = Aligned128
245 #elif EIGEN_MAX_ALIGN_BYTES==64
246  AlignedMax = Aligned64
247 #elif EIGEN_MAX_ALIGN_BYTES==32
248  AlignedMax = Aligned32
249 #elif EIGEN_MAX_ALIGN_BYTES==16
250  AlignedMax = Aligned16
251 #elif EIGEN_MAX_ALIGN_BYTES==8
252  AlignedMax = Aligned8
253 #elif EIGEN_MAX_ALIGN_BYTES==0
254  AlignedMax = Unaligned
255 #else
256 #error Invalid value for EIGEN_MAX_ALIGN_BYTES
257 #endif
258 };
259 
273 };
274 
277 enum TraversalType {
279  DefaultTraversal,
281  LinearTraversal,
284  InnerVectorizedTraversal,
287  LinearVectorizedTraversal,
290  SliceVectorizedTraversal,
292  InvalidTraversal,
294  AllAtOnceTraversal
295 };
296 
299 enum UnrollingType {
301  NoUnrolling,
303  InnerUnrolling,
306  CompleteUnrolling
307 };
308 
311 enum SpecializedType {
312  Specialized,
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 
362 enum NoChange_t { NoChange };
363 enum Sequential_t { Sequential };
364 enum Default_t { Default };
365 
368 enum AmbiVectorMode {
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,
409  EigVecMask = EigenvaluesOnly | ComputeEigenvectors,
412  Ax_lBx = 0x100,
415  ABx_lx = 0x200,
418  BAx_lx = 0x400,
420  GenEigMask = Ax_lBx | ABx_lx | BAx_lx
421 };
422 
434 };
435 
436 #ifdef Success
437 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
438 #endif
439 
444  Success = 0,
451  InvalidInput = 3
452 };
453 
459  Isometry = 0x1,
462  Affine = 0x2,
466  Projective = 0x20
467 };
468 
471 namespace Architecture
472 {
473  enum Type {
474  Generic = 0x0,
475  SSE = 0x1,
476  AltiVec = 0x2,
477  VSX = 0x3,
478  NEON = 0x4,
479  MSA = 0x5,
480  SVE = 0x6,
481 #if defined EIGEN_VECTORIZE_SSE
482  Target = SSE
483 #elif defined EIGEN_VECTORIZE_ALTIVEC
484  Target = AltiVec
485 #elif defined EIGEN_VECTORIZE_VSX
486  Target = VSX
487 #elif defined EIGEN_VECTORIZE_NEON
488  Target = NEON
489 #elif defined EIGEN_VECTORIZE_SVE
490  Target = SVE
491 #elif defined EIGEN_VECTORIZE_MSA
492  Target = MSA
493 #else
494  Target = Generic
495 #endif
496  };
497 }
498 
501 enum ProductImplType
502 { DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
503 
506 enum Action {GetAction, SetAction};
507 
509 struct Dense {};
510 
512 struct Sparse {};
513 
515 struct SolverStorage {};
516 
519 
522 
524 struct MatrixXpr {};
525 
527 struct ArrayXpr {};
528 
529 // An evaluator must define its shape. By default, it can be one of the following:
530 struct DenseShape { static std::string debugName() { return "DenseShape"; } };
531 struct SolverShape { static std::string debugName() { return "SolverShape"; } };
532 struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
533 struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
534 struct BandShape { static std::string debugName() { return "BandShape"; } };
535 struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
536 struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
537 struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
538 struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
539 struct SparseShape { static std::string debugName() { return "SparseShape"; } };
540 
541 namespace internal {
542 
543  // random access iterators based on coeff*() accessors.
544 struct IndexBased {};
545 
546 // evaluator based on iterators to access coefficients.
547 struct IteratorBased {};
548 
552 enum ComparisonName {
553  cmp_EQ = 0,
554  cmp_LT = 1,
555  cmp_LE = 2,
556  cmp_UNORD = 3,
557  cmp_NEQ = 4,
558  cmp_GT = 5,
559  cmp_GE = 6
560 };
561 } // end namespace internal
562 
563 } // end namespace Eigen
564 
565 #endif // EIGEN_CONSTANTS_H
UpLoType
Definition: Constants.h:209
AlignmentType
Definition: Constants.h:234
QRPreconditioners
Definition: Constants.h:425
NaNPropagationOptions
Definition: Constants.h:341
ComputationInfo
Definition: Constants.h:442
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:457
@ 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
@ 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
@ Aligned
Definition: Constants.h:242
@ NoQRPreconditioner
Definition: Constants.h:429
@ 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:446
@ InvalidInput
Definition: Constants.h:451
@ Success
Definition: Constants.h:444
@ NoConvergence
Definition: Constants.h:448
@ 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
@ ComputeFullV
Definition: Constants.h:399
@ ComputeThinV
Definition: Constants.h:401
@ Ax_lBx
Definition: Constants.h:412
@ ComputeEigenvectors
Definition: Constants.h:407
@ BAx_lx
Definition: Constants.h:418
@ ABx_lx
Definition: Constants.h:415
@ ComputeFullU
Definition: Constants.h:395
@ ComputeThinU
Definition: Constants.h:397
@ EigenvaluesOnly
Definition: Constants.h:404
@ Affine
Definition: Constants.h:462
@ Projective
Definition: Constants.h:466
@ AffineCompact
Definition: Constants.h:464
@ Isometry
Definition: Constants.h:459
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
Namespace containing all symbols from the Eigen library.
Definition: Core:139
const int UndefinedIncr
Definition: Constants.h:33
const int HugeCost
Definition: Constants.h:46
const int DynamicIndex
Definition: Constants.h:29
const int Infinity
Definition: Constants.h:38
const int Dynamic
Definition: Constants.h:24
Definition: Constants.h:527
Definition: Constants.h:509
Definition: Constants.h:524
Definition: Constants.h:518
Definition: Constants.h:515
Definition: Constants.h:512
Definition: Constants.h:521