Medial Code Documentation
Loading...
Searching...
No Matches
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
15namespace Eigen {
16
22const int Dynamic = -1;
23
27const int DynamicIndex = 0xffffff;
28
31const int UndefinedIncr = 0xfffffe;
32
36const int Infinity = -1;
37
44const int HugeCost = 10000;
45
66const unsigned int RowMajorBit = 0x1;
67
70const unsigned int EvalBeforeNestingBit = 0x2;
71
75EIGEN_DEPRECATED
76const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
77
94const unsigned int PacketAccessBit = 0x8;
95
96#ifdef EIGEN_VECTORIZE
105const unsigned int ActualPacketAccessBit = PacketAccessBit;
106#else
107const unsigned int ActualPacketAccessBit = 0x0;
108#endif
109
130const unsigned int LinearAccessBit = 0x10;
131
144const unsigned int LvalueBit = 0x20;
145
155const unsigned int DirectAccessBit = 0x40;
156
167EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
168
169const unsigned int NestByRefBit = 0x100;
170
178const unsigned int NoPreferredStorageOrderBit = 0x200;
179
191const unsigned int CompressedAccessBit = 0x400;
192
193
194// list of flags that are inherited by default
195const unsigned int HereditaryBits = RowMajorBit
197
229
239 AlignedMask=255,
241#if EIGEN_MAX_ALIGN_BYTES==128
242 AlignedMax = Aligned128
243#elif EIGEN_MAX_ALIGN_BYTES==64
244 AlignedMax = Aligned64
245#elif EIGEN_MAX_ALIGN_BYTES==32
246 AlignedMax = Aligned32
247#elif EIGEN_MAX_ALIGN_BYTES==16
248 AlignedMax = Aligned16
249#elif EIGEN_MAX_ALIGN_BYTES==8
250 AlignedMax = Aligned8
251#elif EIGEN_MAX_ALIGN_BYTES==0
252 AlignedMax = Unaligned
253#else
254#error Invalid value for EIGEN_MAX_ALIGN_BYTES
255#endif
256};
257
272
275enum TraversalType {
277 DefaultTraversal,
279 LinearTraversal,
282 InnerVectorizedTraversal,
285 LinearVectorizedTraversal,
288 SliceVectorizedTraversal,
290 InvalidTraversal,
292 AllAtOnceTraversal
293};
294
297enum UnrollingType {
299 NoUnrolling,
301 InnerUnrolling,
304 CompleteUnrolling
305};
306
309enum SpecializedType {
310 Specialized,
311 BuiltIn
312};
313
321 RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
// FIXME --- clarify the situation
325 DontAlign = 0x2
327
336
347
348/* the following used to be written as:
349 *
350 * struct NoChange_t {};
351 * namespace {
352 * EIGEN_UNUSED NoChange_t NoChange;
353 * }
354 *
355 * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
356 * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
357 * and we do not know how to get rid of them (bug 450).
358 */
359
360enum NoChange_t { NoChange };
361enum Sequential_t { Sequential };
362enum Default_t { Default };
363
366enum AmbiVectorMode {
367 IsDense = 0,
368 IsSparse
369};
370
384
389 Pivoting = 0x01,
391 NoPivoting = 0x02,
410 Ax_lBx = 0x100,
413 ABx_lx = 0x200,
416 BAx_lx = 0x400,
418 GenEigMask = Ax_lBx | ABx_lx | BAx_lx
419};
420
433
434#ifdef Success
435#error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
436#endif
437
451
466
469namespace Architecture
470{
471 enum Type {
472 Generic = 0x0,
473 SSE = 0x1,
474 AltiVec = 0x2,
475 VSX = 0x3,
476 NEON = 0x4,
477 MSA = 0x5,
478 SVE = 0x6,
479#if defined EIGEN_VECTORIZE_SSE
480 Target = SSE
481#elif defined EIGEN_VECTORIZE_ALTIVEC
482 Target = AltiVec
483#elif defined EIGEN_VECTORIZE_VSX
484 Target = VSX
485#elif defined EIGEN_VECTORIZE_NEON
486 Target = NEON
487#elif defined EIGEN_VECTORIZE_SVE
488 Target = SVE
489#elif defined EIGEN_VECTORIZE_MSA
490 Target = MSA
491#else
492 Target = Generic
493#endif
494 };
495}
496
499enum ProductImplType
500{ DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
501
504enum Action {GetAction, SetAction};
505
507struct Dense {};
508
510struct Sparse {};
511
514
517
520
522struct MatrixXpr {};
523
525struct ArrayXpr {};
526
527// An evaluator must define its shape. By default, it can be one of the following:
528struct DenseShape { static std::string debugName() { return "DenseShape"; } };
529struct SolverShape { static std::string debugName() { return "SolverShape"; } };
530struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
531struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
532struct BandShape { static std::string debugName() { return "BandShape"; } };
533struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
534struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
535struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
536struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
537struct SparseShape { static std::string debugName() { return "SparseShape"; } };
538
539namespace internal {
540
541 // random access iterators based on coeff*() accessors.
542struct IndexBased {};
543
544// evaluator based on iterators to access coefficients.
546
550enum ComparisonName {
551 cmp_EQ = 0,
552 cmp_LT = 1,
553 cmp_LE = 2,
554 cmp_UNORD = 3,
555 cmp_NEQ = 4,
556 cmp_GT = 5,
557 cmp_GE = 6
558};
559} // end namespace internal
560
561} // end namespace Eigen
562
563#endif // EIGEN_CONSTANTS_H
UpLoType
Enum containing possible values for the Mode or UpLo parameter of MatrixBase::selfadjointView() and M...
Definition Constants.h:207
AlignmentType
Enum for indicating whether a buffer is aligned or not.
Definition Constants.h:232
QRPreconditioners
Possible values for the QRPreconditioner template parameter of JacobiSVD.
Definition Constants.h:423
NaNPropagationOptions
Enum for specifying NaN-propagation behavior, e.g.
Definition Constants.h:339
ComputationInfo
Enum for reporting the status of a computation.
Definition Constants.h:440
AccessorLevels
Used as template parameter in DenseCoeffBase and MapBase to indicate which accessors should be provid...
Definition Constants.h:374
StorageOptions
Enum containing possible values for the _Options template parameter of Matrix, Array and BandMatrix.
Definition Constants.h:317
SideType
Enum for specifying whether to apply or solve on the left or right.
Definition Constants.h:330
DirectionType
Enum containing possible values for the Direction parameter of Reverse, PartialReduxExpr and Vectorwi...
Definition Constants.h:261
DecompositionOptions
Enum with options to give to various decompositions.
Definition Constants.h:387
TransformTraits
Enum used to specify how a particular transformation is stored in a matrix.
Definition Constants.h:455
@ StrictlyLower
View matrix as a lower triangular matrix with zeros on the diagonal.
Definition Constants.h:221
@ UnitDiag
Matrix has ones on the diagonal; to be used in combination with #Lower or #Upper.
Definition Constants.h:213
@ StrictlyUpper
View matrix as an upper triangular matrix with zeros on the diagonal.
Definition Constants.h:223
@ UnitLower
View matrix as a lower triangular matrix with ones on the diagonal.
Definition Constants.h:217
@ ZeroDiag
Matrix has zeros on the diagonal; to be used in combination with #Lower or #Upper.
Definition Constants.h:215
@ SelfAdjoint
Used in BandMatrix and SelfAdjointView to indicate that the matrix is self-adjoint.
Definition Constants.h:225
@ Symmetric
Used to support symmetric, non-selfadjoint, complex matrices.
Definition Constants.h:227
@ UnitUpper
View matrix as an upper triangular matrix with ones on the diagonal.
Definition Constants.h:219
@ Lower
View matrix as a lower triangular matrix.
Definition Constants.h:209
@ Upper
View matrix as an upper triangular matrix.
Definition Constants.h:211
@ Aligned64
Data pointer is aligned on a 64 bytes boundary.
Definition Constants.h:237
@ Unaligned
Data pointer has no specific alignment.
Definition Constants.h:233
@ Aligned128
Data pointer is aligned on a 128 bytes boundary.
Definition Constants.h:238
@ Aligned32
Data pointer is aligned on a 32 bytes boundary.
Definition Constants.h:236
@ Aligned8
Data pointer is aligned on a 8 bytes boundary.
Definition Constants.h:234
@ Aligned16
Data pointer is aligned on a 16 bytes boundary.
Definition Constants.h:235
@ Aligned
Definition Constants.h:240
@ NoQRPreconditioner
Do not specify what is to be done if the SVD of a non-square matrix is asked for.
Definition Constants.h:425
@ HouseholderQRPreconditioner
Use a QR decomposition without pivoting as the first step.
Definition Constants.h:427
@ ColPivHouseholderQRPreconditioner
Use a QR decomposition with column pivoting as the first step.
Definition Constants.h:429
@ FullPivHouseholderQRPreconditioner
Use a QR decomposition with full pivoting as the first step.
Definition Constants.h:431
@ PropagateNaN
Always propagate NaNs.
Definition Constants.h:343
@ PropagateNumbers
Always propagate not-NaNs.
Definition Constants.h:345
@ PropagateFast
Implementation defined behavior if NaNs are present.
Definition Constants.h:341
@ NumericalIssue
The provided data did not satisfy the prerequisites.
Definition Constants.h:444
@ InvalidInput
The inputs are invalid, or the algorithm has been improperly called.
Definition Constants.h:449
@ Success
Computation was successful.
Definition Constants.h:442
@ NoConvergence
Iterative procedure did not converge.
Definition Constants.h:446
@ DirectAccessors
Direct read-only access to the coefficients.
Definition Constants.h:380
@ ReadOnlyAccessors
Read-only access via a member function.
Definition Constants.h:376
@ WriteAccessors
Read/write access via member functions.
Definition Constants.h:378
@ DirectWriteAccessors
Direct read/write access to the coefficients.
Definition Constants.h:382
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition Constants.h:319
@ DontAlign
Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated,...
Definition Constants.h:325
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition Constants.h:321
@ AutoAlign
Align the matrix itself if it is vectorizable fixed-size.
Definition Constants.h:323
@ OnTheLeft
Apply transformation on the left.
Definition Constants.h:332
@ OnTheRight
Apply transformation on the right.
Definition Constants.h:334
@ BothDirections
For Reverse, both rows and columns are reversed; not used for PartialReduxExpr and VectorwiseOp.
Definition Constants.h:270
@ Horizontal
For Reverse, all rows are reversed; for PartialReduxExpr and VectorwiseOp, act on rows.
Definition Constants.h:267
@ Vertical
For Reverse, all columns are reversed; for PartialReduxExpr and VectorwiseOp, act on columns.
Definition Constants.h:264
@ ComputeFullV
Used in JacobiSVD to indicate that the square matrix V is to be computed.
Definition Constants.h:397
@ ComputeThinV
Used in JacobiSVD to indicate that the thin matrix V is to be computed.
Definition Constants.h:399
@ Ax_lBx
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition Constants.h:410
@ ComputeEigenvectors
Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify that both the eigenva...
Definition Constants.h:405
@ BAx_lx
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition Constants.h:416
@ ABx_lx
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition Constants.h:413
@ ComputeFullU
Used in JacobiSVD to indicate that the square matrix U is to be computed.
Definition Constants.h:393
@ ComputeThinU
Used in JacobiSVD to indicate that the thin matrix U is to be computed.
Definition Constants.h:395
@ EigenvaluesOnly
Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify that only the eigenva...
Definition Constants.h:402
@ Affine
Transformation is an affine transformation stored as a (Dim+1)^2 matrix whose last row is assumed to ...
Definition Constants.h:460
@ Projective
Transformation is a general projective transformation stored as a (Dim+1)^2 matrix.
Definition Constants.h:464
@ AffineCompact
Transformation is an affine transformation stored as a (Dim) x (Dim+1) matrix.
Definition Constants.h:462
@ Isometry
Transformation is an isometry.
Definition Constants.h:457
EIGEN_DEPRECATED const unsigned int EvalBeforeAssigningBit
Definition Constants.h:76
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition Constants.h:94
const unsigned int NoPreferredStorageOrderBit
for an expression, this means that the storage order can be either row-major or column-major.
Definition Constants.h:178
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition Constants.h:130
const unsigned int EvalBeforeNestingBit
means the expression should be evaluated by the calling expression
Definition Constants.h:70
const unsigned int DirectAccessBit
Means that the underlying array of coefficients can be directly accessed as a plain strided array.
Definition Constants.h:155
EIGEN_DEPRECATED const unsigned int AlignedBit
Definition Constants.h:167
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition Constants.h:144
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:66
const unsigned int CompressedAccessBit
Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed ...
Definition Constants.h:191
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
const int UndefinedIncr
This value means that the increment to go from one value to another in a sequence is not constant for...
Definition Constants.h:31
const int HugeCost
This value means that the cost to evaluate an expression coefficient is either very expensive or cann...
Definition Constants.h:44
const int DynamicIndex
This value means that a signed quantity (e.g., a signed index) is not known at compile-time,...
Definition Constants.h:27
const int Infinity
This value means +Infinity; it is currently used only as the p parameter to MatrixBase::lpNorm<int>()...
Definition Constants.h:36
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition Constants.h:22
The type used to identify an array expression.
Definition Constants.h:525
Definition Constants.h:532
Definition Constants.h:528
The type used to identify a dense storage.
Definition Constants.h:507
Definition Constants.h:531
Definition Constants.h:530
The type used to identify a matrix expression.
Definition Constants.h:522
Definition Constants.h:535
The type used to identify a permutation storage.
Definition Constants.h:516
Definition Constants.h:534
Definition Constants.h:529
The type used to identify a general solver (factored) storage.
Definition Constants.h:513
Definition Constants.h:537
The type used to identify a general sparse storage.
Definition Constants.h:510
Definition Constants.h:536
The type used to identify a permutation storage.
Definition Constants.h:519
Definition Constants.h:533
Definition Constants.h:542
Definition Constants.h:545