Eigen  3.4.90 (git rev 5a9f66fb35d03a4da9ef8976e67a61b30aa16dcf)
 
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 <[email protected]>
5// Copyright (C) 2007-2009 Benoit Jacob <[email protected]>
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
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
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
323 // FIXME --- clarify the situation
324 DontAlign = 0x2
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#if defined EIGEN_VECTORIZE_SSE
478 Target = SSE
479#elif defined EIGEN_VECTORIZE_ALTIVEC
480 Target = AltiVec
481#elif defined EIGEN_VECTORIZE_VSX
482 Target = VSX
483#elif defined EIGEN_VECTORIZE_NEON
484 Target = NEON
485#elif defined EIGEN_VECTORIZE_SVE
486 Target = SVE
487#elif defined EIGEN_VECTORIZE_MSA
488 Target = MSA
489#elif defined EIGEN_VECTORIZE_HVX
490 Target = HVX
491#else
492 Target = Generic
493#endif
494};
495} // namespace Architecture
496
499enum ProductImplType {
500 DefaultProduct = 0,
501 LazyProduct,
502 AliasFreeProduct,
503 CoeffBasedProductMode,
504 LazyCoeffBasedProductMode,
505 OuterProduct,
506 InnerProduct,
507 GemvProduct,
508 GemmProduct
509};
510
513enum Action { GetAction, SetAction };
514
516struct Dense {};
517
519struct Sparse {};
520
523
526
529
531struct MatrixXpr {};
532
534struct ArrayXpr {};
535
536// An evaluator must define its shape. By default, it can be one of the following:
537struct DenseShape {
538 static std::string debugName() { return "DenseShape"; }
539};
540struct SolverShape {
541 static std::string debugName() { return "SolverShape"; }
542};
543struct HomogeneousShape {
544 static std::string debugName() { return "HomogeneousShape"; }
545};
546struct DiagonalShape {
547 static std::string debugName() { return "DiagonalShape"; }
548};
549struct SkewSymmetricShape {
550 static std::string debugName() { return "SkewSymmetricShape"; }
551};
552struct BandShape {
553 static std::string debugName() { return "BandShape"; }
554};
555struct TriangularShape {
556 static std::string debugName() { return "TriangularShape"; }
557};
558struct SelfAdjointShape {
559 static std::string debugName() { return "SelfAdjointShape"; }
560};
561struct PermutationShape {
562 static std::string debugName() { return "PermutationShape"; }
563};
564struct TranspositionsShape {
565 static std::string debugName() { return "TranspositionsShape"; }
566};
567struct SparseShape {
568 static std::string debugName() { return "SparseShape"; }
569};
570
571namespace internal {
572
573// random access iterators based on coeff*() accessors.
574struct IndexBased {};
575
576// evaluator based on iterators to access coefficients.
577struct IteratorBased {};
578
582enum ComparisonName : unsigned int {
583 cmp_EQ = 0,
584 cmp_LT = 1,
585 cmp_LE = 2,
586 cmp_UNORD = 3,
587 cmp_NEQ = 4,
588 cmp_GT = 5,
589 cmp_GE = 6
590};
591} // end namespace internal
592
593} // end namespace Eigen
594
595#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 Core:137
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:534
Definition Constants.h:516
Definition Constants.h:531
Definition Constants.h:525
Definition Constants.h:522
Definition Constants.h:519
Definition Constants.h:528