Eigen  3.3.0
 
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//
7// This Source Code Form is subject to the terms of the Mozilla
8// Public License v. 2.0. If a copy of the MPL was not distributed
9// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
11#ifndef EIGEN_CONSTANTS_H
12#define EIGEN_CONSTANTS_H
13
14namespace Eigen {
15
21const int Dynamic = -1;
22
26const int DynamicIndex = 0xffffff;
27
31const int Infinity = -1;
32
39const int HugeCost = 10000;
40
61const unsigned int RowMajorBit = 0x1;
62
65const unsigned int EvalBeforeNestingBit = 0x2;
66
70EIGEN_DEPRECATED
71const unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated
72
89const unsigned int PacketAccessBit = 0x8;
90
91#ifdef EIGEN_VECTORIZE
101#else
102const unsigned int ActualPacketAccessBit = 0x0;
103#endif
104
125const unsigned int LinearAccessBit = 0x10;
126
139const unsigned int LvalueBit = 0x20;
140
150const unsigned int DirectAccessBit = 0x40;
151
162EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
163
164const unsigned int NestByRefBit = 0x100;
165
173const unsigned int NoPreferredStorageOrderBit = 0x200;
174
186const unsigned int CompressedAccessBit = 0x400;
187
188
189// list of flags that are inherited by default
190const unsigned int HereditaryBits = RowMajorBit
192
204 Lower=0x1,
206 Upper=0x2,
222 Symmetric=0x20
224
234 AlignedMask=255,
236#if EIGEN_MAX_ALIGN_BYTES==128
237 AlignedMax = Aligned128
238#elif EIGEN_MAX_ALIGN_BYTES==64
239 AlignedMax = Aligned64
240#elif EIGEN_MAX_ALIGN_BYTES==32
241 AlignedMax = Aligned32
242#elif EIGEN_MAX_ALIGN_BYTES==16
243 AlignedMax = Aligned16
244#elif EIGEN_MAX_ALIGN_BYTES==8
245 AlignedMax = Aligned8
246#elif EIGEN_MAX_ALIGN_BYTES==0
247 AlignedMax = Unaligned
248#else
249#error Invalid value for EIGEN_MAX_ALIGN_BYTES
250#endif
251};
252
255// FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
256// TODO: find out what to do with that. Adapt the AlignedBox API ?
257enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
258
273
276enum TraversalType {
278 DefaultTraversal,
280 LinearTraversal,
283 InnerVectorizedTraversal,
286 LinearVectorizedTraversal,
289 SliceVectorizedTraversal,
291 InvalidTraversal,
293 AllAtOnceTraversal
294};
295
298enum UnrollingType {
300 NoUnrolling,
302 InnerUnrolling,
305 CompleteUnrolling
306};
307
310enum SpecializedType {
311 Specialized,
312 BuiltIn
313};
314
322 RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
324 AutoAlign = 0, // FIXME --- clarify the situation
326 DontAlign = 0x2
328
335 OnTheRight = 2
337
338/* the following used to be written as:
339 *
340 * struct NoChange_t {};
341 * namespace {
342 * EIGEN_UNUSED NoChange_t NoChange;
343 * }
344 *
345 * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
346 * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
347 * and we do not know how to get rid of them (bug 450).
348 */
349
350enum NoChange_t { NoChange };
351enum Sequential_t { Sequential };
352enum Default_t { Default };
353
356enum AmbiVectorMode {
357 IsDense = 0,
358 IsSparse
359};
360
374
379 Pivoting = 0x01,
381 NoPivoting = 0x02,
400 Ax_lBx = 0x100,
403 ABx_lx = 0x200,
406 BAx_lx = 0x400,
408 GenEigMask = Ax_lBx | ABx_lx | BAx_lx
409};
410
423
424#ifdef Success
425#error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
426#endif
427
439 InvalidInput = 3
441
447 Isometry = 0x1,
450 Affine = 0x2,
454 Projective = 0x20
456
459namespace Architecture
460{
461 enum Type {
462 Generic = 0x0,
463 SSE = 0x1,
464 AltiVec = 0x2,
465 VSX = 0x3,
466 NEON = 0x4,
467#if defined EIGEN_VECTORIZE_SSE
468 Target = SSE
469#elif defined EIGEN_VECTORIZE_ALTIVEC
470 Target = AltiVec
471#elif defined EIGEN_VECTORIZE_VSX
472 Target = VSX
473#elif defined EIGEN_VECTORIZE_NEON
474 Target = NEON
475#else
476 Target = Generic
477#endif
478 };
479}
480
483enum ProductImplType
484{ DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
485
488enum Action {GetAction, SetAction};
489
491struct Dense {};
492
494struct Sparse {};
495
498
501
504
506struct MatrixXpr {};
507
509struct ArrayXpr {};
510
511// An evaluator must define its shape. By default, it can be one of the following:
512struct DenseShape { static std::string debugName() { return "DenseShape"; } };
513struct SolverShape { static std::string debugName() { return "SolverShape"; } };
514struct HomogeneousShape { static std::string debugName() { return "HomogeneousShape"; } };
515struct DiagonalShape { static std::string debugName() { return "DiagonalShape"; } };
516struct BandShape { static std::string debugName() { return "BandShape"; } };
517struct TriangularShape { static std::string debugName() { return "TriangularShape"; } };
518struct SelfAdjointShape { static std::string debugName() { return "SelfAdjointShape"; } };
519struct PermutationShape { static std::string debugName() { return "PermutationShape"; } };
520struct TranspositionsShape { static std::string debugName() { return "TranspositionsShape"; } };
521struct SparseShape { static std::string debugName() { return "SparseShape"; } };
522
523namespace internal {
524
525 // random access iterators based on coeff*() accessors.
526struct IndexBased {};
527
528// evaluator based on iterators to access coefficients.
529struct IteratorBased {};
530
534enum ComparisonName {
535 cmp_EQ = 0,
536 cmp_LT = 1,
537 cmp_LE = 2,
538 cmp_UNORD = 3,
539 cmp_NEQ = 4,
540 cmp_GT = 5,
541 cmp_GE = 6
542};
543} // end namespace internal
544
545} // end namespace Eigen
546
547#endif // EIGEN_CONSTANTS_H
UpLoType
Definition: Constants.h:202
AlignmentType
Definition: Constants.h:227
QRPreconditioners
Definition: Constants.h:413
ComputationInfo
Definition: Constants.h:430
AccessorLevels
Definition: Constants.h:364
StorageOptions
Definition: Constants.h:318
CornerType
Definition: Constants.h:257
SideType
Definition: Constants.h:331
DirectionType
Definition: Constants.h:262
DecompositionOptions
Definition: Constants.h:377
TransformTraits
Definition: Constants.h:445
@ StrictlyLower
Definition: Constants.h:216
@ UnitDiag
Definition: Constants.h:208
@ StrictlyUpper
Definition: Constants.h:218
@ UnitLower
Definition: Constants.h:212
@ ZeroDiag
Definition: Constants.h:210
@ SelfAdjoint
Definition: Constants.h:220
@ Symmetric
Definition: Constants.h:222
@ UnitUpper
Definition: Constants.h:214
@ Lower
Definition: Constants.h:204
@ Upper
Definition: Constants.h:206
@ Aligned64
Definition: Constants.h:232
@ Unaligned
Definition: Constants.h:228
@ Aligned128
Definition: Constants.h:233
@ Aligned32
Definition: Constants.h:231
@ Aligned8
Definition: Constants.h:229
@ Aligned16
Definition: Constants.h:230
@ Aligned
Definition: Constants.h:235
@ NoQRPreconditioner
Definition: Constants.h:415
@ HouseholderQRPreconditioner
Definition: Constants.h:417
@ ColPivHouseholderQRPreconditioner
Definition: Constants.h:419
@ FullPivHouseholderQRPreconditioner
Definition: Constants.h:421
@ NumericalIssue
Definition: Constants.h:434
@ InvalidInput
Definition: Constants.h:439
@ Success
Definition: Constants.h:432
@ NoConvergence
Definition: Constants.h:436
@ DirectAccessors
Definition: Constants.h:370
@ ReadOnlyAccessors
Definition: Constants.h:366
@ WriteAccessors
Definition: Constants.h:368
@ DirectWriteAccessors
Definition: Constants.h:372
@ ColMajor
Definition: Constants.h:320
@ DontAlign
Definition: Constants.h:326
@ RowMajor
Definition: Constants.h:322
@ AutoAlign
Definition: Constants.h:324
@ OnTheLeft
Definition: Constants.h:333
@ OnTheRight
Definition: Constants.h:335
@ BothDirections
Definition: Constants.h:271
@ Horizontal
Definition: Constants.h:268
@ Vertical
Definition: Constants.h:265
@ ComputeFullV
Definition: Constants.h:387
@ ComputeThinV
Definition: Constants.h:389
@ Ax_lBx
Definition: Constants.h:400
@ ComputeEigenvectors
Definition: Constants.h:395
@ BAx_lx
Definition: Constants.h:406
@ ABx_lx
Definition: Constants.h:403
@ ComputeFullU
Definition: Constants.h:383
@ ComputeThinU
Definition: Constants.h:385
@ EigenvaluesOnly
Definition: Constants.h:392
@ Affine
Definition: Constants.h:450
@ Projective
Definition: Constants.h:454
@ AffineCompact
Definition: Constants.h:452
@ Isometry
Definition: Constants.h:447
const unsigned int ActualPacketAccessBit
Definition: Constants.h:100
EIGEN_DEPRECATED const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:71
const unsigned int PacketAccessBit
Definition: Constants.h:89
const unsigned int NoPreferredStorageOrderBit
Definition: Constants.h:173
const unsigned int LinearAccessBit
Definition: Constants.h:125
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:65
const unsigned int DirectAccessBit
Definition: Constants.h:150
EIGEN_DEPRECATED const unsigned int AlignedBit
Definition: Constants.h:162
const unsigned int LvalueBit
Definition: Constants.h:139
const unsigned int RowMajorBit
Definition: Constants.h:61
const unsigned int CompressedAccessBit
Definition: Constants.h:186
Namespace containing all symbols from the Eigen library.
Definition: Core:287
const int HugeCost
Definition: Constants.h:39
const int DynamicIndex
Definition: Constants.h:26
const int Infinity
Definition: Constants.h:31
const int Dynamic
Definition: Constants.h:21
Definition: Constants.h:509
Definition: Constants.h:491
Definition: Constants.h:506
Definition: Constants.h:500
Definition: Constants.h:497
Definition: Constants.h:494
Definition: Constants.h:503