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 // IWYU pragma: private
16 #include "../InternalHeaderCheck.h"
17 
18 namespace Eigen {
19 
25 const int Dynamic = -1;
26 
30 const int DynamicIndex = 0xffffff;
31 
34 const int Undefined = 0xfffffe;
35 
39 const int Infinity = -1;
40 
48 const int HugeCost = 10000;
49 
70 const unsigned int RowMajorBit = 0x1;
71 
74 const unsigned int EvalBeforeNestingBit = 0x2;
75 
79 EIGEN_DEPRECATED const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
80 
97 const unsigned int PacketAccessBit = 0x8;
98 
99 #ifdef EIGEN_VECTORIZE
108 const unsigned int ActualPacketAccessBit = PacketAccessBit;
109 #else
110 const unsigned int ActualPacketAccessBit = 0x0;
111 #endif
112 
133 const unsigned int LinearAccessBit = 0x10;
134 
148 const unsigned int LvalueBit = 0x20;
149 
159 const unsigned int DirectAccessBit = 0x40;
160 
171 EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
172 
173 const unsigned int NestByRefBit = 0x100;
174 
182 const unsigned int NoPreferredStorageOrderBit = 0x200;
183 
195 const unsigned int CompressedAccessBit = 0x400;
196 
197 // list of flags that are inherited by default
199 
209 enum UpLoType {
211  Lower = 0x1,
213  Upper = 0x2,
215  UnitDiag = 0x4,
217  ZeroDiag = 0x8,
227  SelfAdjoint = 0x10,
229  Symmetric = 0x20
230 };
231 
235  Unaligned = 0,
236  Aligned8 = 8,
237  Aligned16 = 16,
238  Aligned32 = 32,
239  Aligned64 = 64,
240  Aligned128 = 128,
241  AlignedMask = 255,
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 
312 
318  ColMajor = 0,
320  RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
322  AutoAlign = 0, // FIXME --- clarify the situation
324  DontAlign = 0x2
325 };
326 
329 enum SideType {
333  OnTheRight = 2
334 };
335 
345 };
346 
347 /* the following used to be written as:
348  *
349  * struct NoChange_t {};
350  * namespace {
351  * EIGEN_UNUSED NoChange_t NoChange;
352  * }
353  *
354  * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
355  * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
356  * and we do not know how to get rid of them (bug 450).
357  */
358 
362 
366 
379 };
380 
385  Pivoting = 0x01,
387  NoPivoting = 0x02,
389  ComputeFullU = 0x04,
391  ComputeThinU = 0x08,
393  ComputeFullV = 0x10,
395  ComputeThinV = 0x20,
406  Ax_lBx = 0x100,
409  ABx_lx = 0x200,
412  BAx_lx = 0x400,
415 };
416 
430 };
431 
432 #ifdef Success
433 #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
434 #endif
435 
440  Success = 0,
447  InvalidInput = 3
448 };
449 
455  Isometry = 0x1,
458  Affine = 0x2,
462  Projective = 0x20
463 };
464 
467 namespace Architecture {
468 enum Type {
469  Generic = 0x0,
470  SSE = 0x1,
471  AltiVec = 0x2,
472  VSX = 0x3,
473  NEON = 0x4,
474  MSA = 0x5,
475  SVE = 0x6,
476  HVX = 0x7,
477  LSX = 0x8,
478 #if defined EIGEN_VECTORIZE_SSE
479  Target = SSE
480 #elif defined EIGEN_VECTORIZE_ALTIVEC
481  Target = AltiVec
482 #elif defined EIGEN_VECTORIZE_VSX
483  Target = VSX
484 #elif defined EIGEN_VECTORIZE_NEON
485  Target = NEON
486 #elif defined EIGEN_VECTORIZE_SVE
487  Target = SVE
488 #elif defined EIGEN_VECTORIZE_MSA
489  Target = MSA
490 #elif defined EIGEN_VECTORIZE_HVX
491  Target = HVX
492 #elif defined EIGEN_VECTORIZE_LSX
493  Target = LSX
494 #else
495  Target = Generic
496 #endif
497 };
498 } // namespace Architecture
499 
512 };
513 
517 
519 struct Dense {};
520 
522 struct Sparse {};
523 
525 struct SolverStorage {};
526 
529 
532 
534 struct MatrixXpr {};
535 
537 struct ArrayXpr {};
538 
539 // An evaluator must define its shape. By default, it can be one of the following:
540 struct DenseShape {
541  static std::string debugName() { return "DenseShape"; }
542 };
543 struct SolverShape {
544  static std::string debugName() { return "SolverShape"; }
545 };
547  static std::string debugName() { return "HomogeneousShape"; }
548 };
550  static std::string debugName() { return "DiagonalShape"; }
551 };
553  static std::string debugName() { return "SkewSymmetricShape"; }
554 };
555 struct BandShape {
556  static std::string debugName() { return "BandShape"; }
557 };
559  static std::string debugName() { return "TriangularShape"; }
560 };
562  static std::string debugName() { return "SelfAdjointShape"; }
563 };
565  static std::string debugName() { return "PermutationShape"; }
566 };
568  static std::string debugName() { return "TranspositionsShape"; }
569 };
570 struct SparseShape {
571  static std::string debugName() { return "SparseShape"; }
572 };
573 
574 namespace internal {
575 
576 // random access iterators based on coeff*() accessors.
577 struct IndexBased {};
578 
579 // evaluator based on iterators to access coefficients.
580 struct IteratorBased {};
581 
585 enum ComparisonName : unsigned int {
586  cmp_EQ = 0,
587  cmp_LT = 1,
588  cmp_LE = 2,
590  cmp_NEQ = 4,
591  cmp_GT = 5,
592  cmp_GE = 6
593 };
594 } // end namespace internal
595 
596 } // end namespace Eigen
597 
598 #endif // EIGEN_CONSTANTS_H
#define EIGEN_DEPRECATED
Definition: Macros.h:931
ProductImplType
Definition: Constants.h:502
UpLoType
Definition: Constants.h:209
Action
Definition: Constants.h:516
TraversalType
Definition: Constants.h:277
AlignmentType
Definition: Constants.h:234
QRPreconditioners
Definition: Constants.h:419
AmbiVectorMode
Definition: Constants.h:365
NaNPropagationOptions
Definition: Constants.h:338
ComputationInfo
Definition: Constants.h:438
SpecializedType
Definition: Constants.h:311
AccessorLevels
Definition: Constants.h:370
StorageOptions
Definition: Constants.h:316
UnrollingType
Definition: Constants.h:299
SideType
Definition: Constants.h:329
DirectionType
Definition: Constants.h:263
DecompositionOptions
Definition: Constants.h:383
TransformTraits
Definition: Constants.h:453
@ GemvProduct
Definition: Constants.h:510
@ LazyProduct
Definition: Constants.h:504
@ InnerProduct
Definition: Constants.h:509
@ DefaultProduct
Definition: Constants.h:503
@ CoeffBasedProductMode
Definition: Constants.h:506
@ OuterProduct
Definition: Constants.h:508
@ AliasFreeProduct
Definition: Constants.h:505
@ GemmProduct
Definition: Constants.h:511
@ LazyCoeffBasedProductMode
Definition: Constants.h:507
@ 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
@ GetAction
Definition: Constants.h:516
@ SetAction
Definition: Constants.h:516
@ 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
@ 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:423
@ DisableQRDecomposition
Definition: Constants.h:429
@ HouseholderQRPreconditioner
Definition: Constants.h:425
@ ColPivHouseholderQRPreconditioner
Definition: Constants.h:421
@ FullPivHouseholderQRPreconditioner
Definition: Constants.h:427
@ IsDense
Definition: Constants.h:365
@ IsSparse
Definition: Constants.h:365
@ PropagateNaN
Definition: Constants.h:342
@ PropagateNumbers
Definition: Constants.h:344
@ PropagateFast
Definition: Constants.h:340
@ NumericalIssue
Definition: Constants.h:442
@ InvalidInput
Definition: Constants.h:447
@ Success
Definition: Constants.h:440
@ NoConvergence
Definition: Constants.h:444
@ Specialized
Definition: Constants.h:311
@ BuiltIn
Definition: Constants.h:311
@ DirectAccessors
Definition: Constants.h:376
@ ReadOnlyAccessors
Definition: Constants.h:372
@ WriteAccessors
Definition: Constants.h:374
@ DirectWriteAccessors
Definition: Constants.h:378
@ ColMajor
Definition: Constants.h:318
@ DontAlign
Definition: Constants.h:324
@ RowMajor
Definition: Constants.h:320
@ AutoAlign
Definition: Constants.h:322
@ InnerUnrolling
Definition: Constants.h:303
@ CompleteUnrolling
Definition: Constants.h:306
@ NoUnrolling
Definition: Constants.h:301
@ OnTheLeft
Definition: Constants.h:331
@ OnTheRight
Definition: Constants.h:333
@ BothDirections
Definition: Constants.h:272
@ Horizontal
Definition: Constants.h:269
@ Vertical
Definition: Constants.h:266
@ GenEigMask
Definition: Constants.h:414
@ ComputeFullV
Definition: Constants.h:393
@ ComputeThinV
Definition: Constants.h:395
@ EigVecMask
Definition: Constants.h:403
@ Ax_lBx
Definition: Constants.h:406
@ ComputeEigenvectors
Definition: Constants.h:401
@ BAx_lx
Definition: Constants.h:412
@ ABx_lx
Definition: Constants.h:409
@ Pivoting
Definition: Constants.h:385
@ ComputeFullU
Definition: Constants.h:389
@ ComputeThinU
Definition: Constants.h:391
@ NoPivoting
Definition: Constants.h:387
@ EigenvaluesOnly
Definition: Constants.h:398
@ Affine
Definition: Constants.h:458
@ Projective
Definition: Constants.h:462
@ AffineCompact
Definition: Constants.h:460
@ Isometry
Definition: Constants.h:455
EIGEN_DEPRECATED const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:79
const unsigned int PacketAccessBit
Definition: Constants.h:97
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:182
const unsigned int LinearAccessBit
Definition: Constants.h:133
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:74
const unsigned int DirectAccessBit
Definition: Constants.h:159
EIGEN_DEPRECATED const unsigned int AlignedBit
Definition: Constants.h:171
const unsigned int LvalueBit
Definition: Constants.h:148
const unsigned int RowMajorBit
Definition: Constants.h:70
const unsigned int CompressedAccessBit
Definition: Constants.h:195
Type
Definition: Constants.h:468
@ SSE
Definition: Constants.h:470
@ VSX
Definition: Constants.h:472
@ Generic
Definition: Constants.h:469
@ NEON
Definition: Constants.h:473
@ AltiVec
Definition: Constants.h:471
@ MSA
Definition: Constants.h:474
@ LSX
Definition: Constants.h:477
@ HVX
Definition: Constants.h:476
@ Target
Definition: Constants.h:495
@ SVE
Definition: Constants.h:475
ComparisonName
Definition: Constants.h:585
@ cmp_NEQ
Definition: Constants.h:590
@ cmp_EQ
Definition: Constants.h:586
@ cmp_GT
Definition: Constants.h:591
@ cmp_LT
Definition: Constants.h:587
@ cmp_GE
Definition: Constants.h:592
@ cmp_LE
Definition: Constants.h:588
@ cmp_UNORD
Definition: Constants.h:589
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
const unsigned int ActualPacketAccessBit
Definition: Constants.h:110
const int Undefined
Definition: Constants.h:34
const unsigned int HereditaryBits
Definition: Constants.h:198
const unsigned int NestByRefBit
Definition: Constants.h:173
const int HugeCost
Definition: Constants.h:48
NoChange_t
Definition: Constants.h:359
@ NoChange
Definition: Constants.h:359
Default_t
Definition: Constants.h:361
@ Default
Definition: Constants.h:361
const int DynamicIndex
Definition: Constants.h:30
const int Infinity
Definition: Constants.h:39
Sequential_t
Definition: Constants.h:360
@ Sequential
Definition: Constants.h:360
const int Dynamic
Definition: Constants.h:25
Definition: Eigen_Colamd.h:49
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
Definition: Constants.h:537
Definition: Constants.h:555
static std::string debugName()
Definition: Constants.h:556
Definition: Constants.h:540
static std::string debugName()
Definition: Constants.h:541
Definition: Constants.h:519
Definition: Constants.h:549
static std::string debugName()
Definition: Constants.h:550
Definition: Constants.h:546
static std::string debugName()
Definition: Constants.h:547
Definition: Constants.h:534
Definition: Constants.h:564
static std::string debugName()
Definition: Constants.h:565
Definition: Constants.h:528
Definition: Constants.h:561
static std::string debugName()
Definition: Constants.h:562
Definition: Constants.h:552
static std::string debugName()
Definition: Constants.h:553
Definition: Constants.h:543
static std::string debugName()
Definition: Constants.h:544
Definition: Constants.h:525
Definition: Constants.h:570
static std::string debugName()
Definition: Constants.h:571
Definition: Constants.h:522
Definition: Constants.h:567
static std::string debugName()
Definition: Constants.h:568
Definition: Constants.h:531
Definition: Constants.h:558
static std::string debugName()
Definition: Constants.h:559
Definition: Constants.h:577
Definition: Constants.h:580