Eigen  5.0.1-dev+60122df6
 
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
15// IWYU pragma: private
16#include "../InternalHeaderCheck.h"
17
18namespace Eigen {
19
25const int Dynamic = -1;
26
30const int DynamicIndex = 0xffffff;
31
34const int Undefined = 0xfffffe;
35
39const int Infinity = -1;
40
48const int HugeCost = 10000;
49
62
70const unsigned int RowMajorBit = 0x1;
71
74const unsigned int EvalBeforeNestingBit = 0x2;
75
79EIGEN_DEPRECATED const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
80
97const unsigned int PacketAccessBit = 0x8;
98
99#ifdef EIGEN_VECTORIZE
109#else
110const unsigned int ActualPacketAccessBit = 0x0;
111#endif
112
133const unsigned int LinearAccessBit = 0x10;
134
148const unsigned int LvalueBit = 0x20;
149
159const unsigned int DirectAccessBit = 0x40;
160
171EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
172
173const unsigned int NestByRefBit = 0x100;
174
182const unsigned int NoPreferredStorageOrderBit = 0x200;
183
195const unsigned int CompressedAccessBit = 0x400;
196
197// list of flags that are inherited by default
198const unsigned int HereditaryBits = RowMajorBit | EvalBeforeNestingBit;
199
205
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
274
277enum TraversalType {
279 DefaultTraversal,
281 LinearTraversal,
284 InnerVectorizedTraversal,
287 LinearVectorizedTraversal,
290 SliceVectorizedTraversal,
292 InvalidTraversal,
294 AllAtOnceTraversal
295};
296
299enum UnrollingType {
301 NoUnrolling,
303 InnerUnrolling,
306 CompleteUnrolling
307};
308
311enum SpecializedType { Specialized, BuiltIn };
312
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
325};
326
335
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
359enum NoChange_t { NoChange };
360enum Sequential_t { Sequential };
361enum Default_t { Default };
362
365enum AmbiVectorMode { IsDense = 0, IsSparse };
366
380
385 Pivoting = 0x01,
387 NoPivoting = 0x02,
406 Ax_lBx = 0x100,
409 ABx_lx = 0x200,
412 BAx_lx = 0x400,
414 GenEigMask = Ax_lBx | ABx_lx | BAx_lx
415};
416
431
432#ifdef Success
433#error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
434#endif
435
449
464
467namespace Architecture {
468enum 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
502enum ProductImplType {
503 DefaultProduct = 0,
504 LazyProduct,
505 AliasFreeProduct,
506 CoeffBasedProductMode,
507 LazyCoeffBasedProductMode,
508 OuterProduct,
509 InnerProduct,
510 GemvProduct,
511 GemmProduct
512};
513
516enum Action { GetAction, SetAction };
517
519struct Dense {};
520
522struct Sparse {};
523
526
529
532
534struct MatrixXpr {};
535
537struct ArrayXpr {};
538
539// An evaluator must define its shape. By default, it can be one of the following:
540struct DenseShape {
541 static std::string debugName() { return "DenseShape"; }
542};
543struct SolverShape {
544 static std::string debugName() { return "SolverShape"; }
545};
546struct HomogeneousShape {
547 static std::string debugName() { return "HomogeneousShape"; }
548};
549struct DiagonalShape {
550 static std::string debugName() { return "DiagonalShape"; }
551};
552struct SkewSymmetricShape {
553 static std::string debugName() { return "SkewSymmetricShape"; }
554};
555struct BandShape {
556 static std::string debugName() { return "BandShape"; }
557};
558struct TriangularShape {
559 static std::string debugName() { return "TriangularShape"; }
560};
561struct SelfAdjointShape {
562 static std::string debugName() { return "SelfAdjointShape"; }
563};
564struct PermutationShape {
565 static std::string debugName() { return "PermutationShape"; }
566};
567struct TranspositionsShape {
568 static std::string debugName() { return "TranspositionsShape"; }
569};
570struct SparseShape {
571 static std::string debugName() { return "SparseShape"; }
572};
573
574namespace internal {
575
576// random access iterators based on coeff*() accessors.
577struct IndexBased {};
578
579// evaluator based on iterators to access coefficients.
580struct IteratorBased {};
581
585enum ComparisonName : unsigned int {
586 cmp_EQ = 0,
587 cmp_LT = 1,
588 cmp_LE = 2,
589 cmp_UNORD = 3,
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
UpLoType
Definition Constants.h:209
AlignmentType
Definition Constants.h:234
QRPreconditioners
Definition Constants.h:419
NaNPropagationOptions
Definition Constants.h:338
ComputationInfo
Definition Constants.h:438
AccessorLevels
Definition Constants.h:370
StorageOptions
Definition Constants.h:316
SideType
Definition Constants.h:329
DirectionType
Definition Constants.h:263
DecompositionOptions
Definition Constants.h:383
TransformTraits
Definition Constants.h:453
@ 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:423
@ DisableQRDecomposition
Definition Constants.h:429
@ HouseholderQRPreconditioner
Definition Constants.h:425
@ ColPivHouseholderQRPreconditioner
Definition Constants.h:421
@ FullPivHouseholderQRPreconditioner
Definition Constants.h:427
@ 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
@ 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
@ 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
@ ComputeFullV
Definition Constants.h:393
@ ComputeThinV
Definition Constants.h:395
@ Ax_lBx
Definition Constants.h:406
@ ComputeEigenvectors
Definition Constants.h:401
@ BAx_lx
Definition Constants.h:412
@ ABx_lx
Definition Constants.h:409
@ ComputeFullU
Definition Constants.h:389
@ ComputeThinU
Definition Constants.h:391
@ 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
const unsigned int ActualPacketAccessBit
Definition Constants.h:108
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
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
const int Undefined
Definition Constants.h:34
const int HugeCost
Definition Constants.h:48
const int DynamicIndex
Definition Constants.h:30
const int Infinity
Definition Constants.h:39
const int Dynamic
Definition Constants.h:25
Definition Constants.h:537
Definition Constants.h:519
Definition Constants.h:534
Definition Constants.h:528
Definition Constants.h:525
Definition Constants.h:522
Definition Constants.h:531