1c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// This file is part of Eigen, a lightweight C++ template library
2c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// for linear algebra.
3c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath//
4c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
5c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
6c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath//
7c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// This Source Code Form is subject to the terms of the Mozilla
8c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// Public License v. 2.0. If a copy of the MPL was not distributed
9c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
11c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#ifndef EIGEN_CONSTANTS_H
12c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#define EIGEN_CONSTANTS_H
13c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
14c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathnamespace Eigen {
15c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
167faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez/** This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is
17c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * stored in some runtime variable.
18c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
19c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Changing the value of Dynamic breaks the ABI, as Dynamic is often used as a template parameter for Matrix.
20c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
21c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst int Dynamic = -1;
22c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
237faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez/** This value means that a signed quantity (e.g., a signed index) is not known at compile-time, and that instead its value
247faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  * has to be specified at runtime.
257faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  */
267faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandezconst int DynamicIndex = 0xffffff;
277faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez
28c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** This value means +Infinity; it is currently used only as the p parameter to MatrixBase::lpNorm<int>().
29c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * The value Infinity there means the L-infinity norm.
30c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
31c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst int Infinity = -1;
32c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
33c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \defgroup flags Flags
34c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * \ingroup Core_Module
35c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
36c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * These are the possible bits which can be OR'ed to constitute the flags of a matrix or
37c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * expression.
38c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
39c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * It is important to note that these flags are a purely compile-time notion. They are a compile-time property of
40c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * an expression type, implemented as enum's. They are not stored in memory at runtime, and they do not incur any
41c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * runtime overhead.
42c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
43c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * \sa MatrixBase::Flags
44c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
45c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
46c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
47c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
48c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * for a matrix, this means that the storage order is row-major.
49c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * If this bit is not set, the storage order is column-major.
50c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * For an expression, this determines the storage order of
51c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * the matrix created by evaluation of that expression.
52c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * \sa \ref TopicStorageOrders */
53c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int RowMajorBit = 0x1;
54c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
55c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
56c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
57c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * means the expression should be evaluated by the calling expression */
58c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int EvalBeforeNestingBit = 0x2;
59c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
60c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
61c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
62c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * means the expression should be evaluated before any assignment */
63c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int EvalBeforeAssigningBit = 0x4;
64c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
65c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
66c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
67c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Short version: means the expression might be vectorized
68c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
69c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Long version: means that the coefficients can be handled by packets
70c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * and start at a memory location whose alignment meets the requirements
71c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * of the present CPU architecture for optimized packet access. In the fixed-size
72c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * case, there is the additional condition that it be possible to access all the
73c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * coefficients by packets (this implies the requirement that the size be a multiple of 16 bytes,
74c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * and that any nontrivial strides don't break the alignment). In the dynamic-size case,
75c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * there is no such condition on the total size and strides, so it might not be possible to access
76c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * all coeffs by packets.
77c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
78c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * \note This bit can be set regardless of whether vectorization is actually enabled.
79c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *       To check for actual vectorizability, see \a ActualPacketAccessBit.
80c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
81c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int PacketAccessBit = 0x8;
82c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
83c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#ifdef EIGEN_VECTORIZE
84c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
85c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
86c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * If vectorization is enabled (EIGEN_VECTORIZE is defined) this constant
87c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * is set to the value \a PacketAccessBit.
88c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
89c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * If vectorization is not enabled (EIGEN_VECTORIZE is not defined) this constant
90c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * is set to the value 0.
91c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
92c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int ActualPacketAccessBit = PacketAccessBit;
93c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#else
94c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int ActualPacketAccessBit = 0x0;
95c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#endif
96c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
97c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
98c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
99c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Short version: means the expression can be seen as 1D vector.
100c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
101c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Long version: means that one can access the coefficients
102c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * of this expression by coeff(int), and coeffRef(int) in the case of a lvalue expression. These
103c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * index-based access methods are guaranteed
104c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * to not have to do any runtime computation of a (row, col)-pair from the index, so that it
105c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * is guaranteed that whenever it is available, index-based access is at least as fast as
106c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * (row,col)-based access. Expressions for which that isn't possible don't have the LinearAccessBit.
107c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
108c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * If both PacketAccessBit and LinearAccessBit are set, then the
109c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * packets of this expression can be accessed by packet(int), and writePacket(int) in the case of a
110c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * lvalue expression.
111c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
112c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Typically, all vector expressions have the LinearAccessBit, but there is one exception:
113c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Product expressions don't have it, because it would be troublesome for vectorization, even when the
114c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Product is a vector expression. Thus, vector Product expressions allow index-based coefficient access but
115c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * not index-based packet access, so they don't have the LinearAccessBit.
116c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
117c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int LinearAccessBit = 0x10;
118c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
119c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
120c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
121c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Means the expression has a coeffRef() method, i.e. is writable as its individual coefficients are directly addressable.
122c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * This rules out read-only expressions.
123c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
124c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Note that DirectAccessBit and LvalueBit are mutually orthogonal, as there are examples of expression having one but note
125c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * the other:
126c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *   \li writable expressions that don't have a very simple memory layout as a strided array, have LvalueBit but not DirectAccessBit
127c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *   \li Map-to-const expressions, for example Map<const Matrix>, have DirectAccessBit but not LvalueBit
128c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
129c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Expressions having LvalueBit also have their coeff() method returning a const reference instead of returning a new value.
130c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
131c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int LvalueBit = 0x20;
132c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
133c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
134c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
135c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Means that the underlying array of coefficients can be directly accessed as a plain strided array. The memory layout
136c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * of the array of coefficients must be exactly the natural one suggested by rows(), cols(),
137c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * outerStride(), innerStride(), and the RowMajorBit. This rules out expressions such as Diagonal, whose coefficients,
138c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * though referencable, do not have such a regular memory layout.
139c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
140c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * See the comment on LvalueBit for an explanation of how LvalueBit and DirectAccessBit are mutually orthogonal.
141c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
142c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int DirectAccessBit = 0x40;
143c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
144c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup flags
145c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
146c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * means the first coefficient packet is guaranteed to be aligned */
147c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int AlignedBit = 0x80;
148c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
149c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int NestByRefBit = 0x100;
150c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
151c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// list of flags that are inherited by default
152c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathconst unsigned int HereditaryBits = RowMajorBit
153c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath                                  | EvalBeforeNestingBit
154c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath                                  | EvalBeforeAssigningBit;
155c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
156c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \defgroup enums Enumerations
157c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * \ingroup Core_Module
158c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  *
159c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Various enumerations used in %Eigen. Many of these are used as template parameters.
160c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  */
161c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
162c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
163c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum containing possible values for the \p Mode parameter of
164c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * MatrixBase::selfadjointView() and MatrixBase::triangularView(). */
165c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
166c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** View matrix as a lower triangular matrix. */
167c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Lower=0x1,
168c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** View matrix as an upper triangular matrix. */
169c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Upper=0x2,
170c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** %Matrix has ones on the diagonal; to be used in combination with #Lower or #Upper. */
171c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  UnitDiag=0x4,
172c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** %Matrix has zeros on the diagonal; to be used in combination with #Lower or #Upper. */
173c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ZeroDiag=0x8,
174c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** View matrix as a lower triangular matrix with ones on the diagonal. */
175c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  UnitLower=UnitDiag|Lower,
176c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** View matrix as an upper triangular matrix with ones on the diagonal. */
177c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  UnitUpper=UnitDiag|Upper,
178c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** View matrix as a lower triangular matrix with zeros on the diagonal. */
179c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  StrictlyLower=ZeroDiag|Lower,
180c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** View matrix as an upper triangular matrix with zeros on the diagonal. */
181c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  StrictlyUpper=ZeroDiag|Upper,
182c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in BandMatrix and SelfAdjointView to indicate that the matrix is self-adjoint. */
183c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  SelfAdjoint=0x10,
184c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used to support symmetric, non-selfadjoint, complex matrices. */
185c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Symmetric=0x20
186c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
187c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
188c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
189c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum for indicating whether an object is aligned or not. */
190c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
191c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Object is not correctly aligned for vectorization. */
192c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Unaligned=0,
193c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Object is aligned for vectorization. */
194c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Aligned=1
195c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
196c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
197c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
198c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Enum used by DenseBase::corner() in Eigen2 compatibility mode. */
199c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// FIXME after the corner() API change, this was not needed anymore, except by AlignedBox
200c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// TODO: find out what to do with that. Adapt the AlignedBox API ?
201c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };
202c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
203c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
204c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum containing possible values for the \p Direction parameter of
205c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Reverse, PartialReduxExpr and VectorwiseOp. */
206c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum DirectionType {
207c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** For Reverse, all columns are reversed;
208c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * for PartialReduxExpr and VectorwiseOp, act on columns. */
209c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Vertical,
210c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** For Reverse, all rows are reversed;
211c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * for PartialReduxExpr and VectorwiseOp, act on rows. */
212c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Horizontal,
213c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** For Reverse, both rows and columns are reversed;
214c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * not used for PartialReduxExpr and VectorwiseOp. */
215c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  BothDirections
216c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
217c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
218c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
219c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum to specify how to traverse the entries of a matrix. */
220c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
221c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Default traversal, no vectorization, no index-based access */
222c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  DefaultTraversal,
223c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal No vectorization, use index-based access to have only one for loop instead of 2 nested loops */
224c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  LinearTraversal,
225c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Equivalent to a slice vectorization for fixed-size matrices having good alignment
226c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * and good size */
227c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  InnerVectorizedTraversal,
228c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Vectorization path using a single loop plus scalar loops for the
229c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * unaligned boundaries */
230c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  LinearVectorizedTraversal,
231c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Generic vectorization path using one vectorized loop per row/column with some
232c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * scalar loops to handle the unaligned boundaries */
233c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  SliceVectorizedTraversal,
234c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Special case to properly handle incompatible scalar types or other defecting cases*/
2357faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  InvalidTraversal,
2367faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  /** \internal Evaluate all entries at once */
2377faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  AllAtOnceTraversal
238c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
239c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
240c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
241c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum to specify whether to unroll loops when traversing over the entries of a matrix. */
242c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
243c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Do not unroll loops. */
244c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  NoUnrolling,
245c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Unroll only the inner loop, but not the outer loop. */
246c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  InnerUnrolling,
247c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Unroll both the inner and the outer loop. If there is only one loop,
248c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * because linear traversal is used, then unroll that loop. */
249c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  CompleteUnrolling
250c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
251c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
252c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
253c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum to specify whether to use the default (built-in) implementation or the specialization. */
254c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
255c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Specialized,
256c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  BuiltIn
257c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
258c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
259c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
260c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum containing possible values for the \p _Options template parameter of
261c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Matrix, Array and BandMatrix. */
262c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
263c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Storage order is column major (see \ref TopicStorageOrders). */
264c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ColMajor = 0,
265c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Storage order is row major (see \ref TopicStorageOrders). */
266c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  RowMajor = 0x1,  // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
2677faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  /** Align the matrix itself if it is vectorizable fixed-size */
268c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  AutoAlign = 0,
2697faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez  /** Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be requested to be aligned) */ // FIXME --- clarify the situation
270c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  DontAlign = 0x2
271c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
272c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
273c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
274c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum for specifying whether to apply or solve on the left or right. */
275c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
276c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Apply transformation on the left. */
277c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  OnTheLeft = 1,
278c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Apply transformation on the right. */
279c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  OnTheRight = 2
280c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
281c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
282c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/* the following used to be written as:
283c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath *
284c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath *   struct NoChange_t {};
285c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath *   namespace {
286c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath *     EIGEN_UNUSED NoChange_t NoChange;
287c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath *   }
288c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath *
289c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
290c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
291c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * and we do not know how to get rid of them (bug 450).
292c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */
293c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
294c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum NoChange_t   { NoChange };
295c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum Sequential_t { Sequential };
296c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum Default_t    { Default };
297c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
298c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
299c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Used in AmbiVector. */
300c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum {
301c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  IsDense         = 0,
302c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  IsSparse
303c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
304c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
305c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
306c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Used as template parameter in DenseCoeffBase and MapBase to indicate
307c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * which accessors should be provided. */
308c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum AccessorLevels {
309c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Read-only access via a member function. */
310c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ReadOnlyAccessors,
311c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Read/write access via member functions. */
312c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  WriteAccessors,
313c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Direct read-only access to the coefficients. */
314c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  DirectAccessors,
315c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Direct read/write access to the coefficients. */
316c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  DirectWriteAccessors
317c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
318c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
319c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
320c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum with options to give to various decompositions. */
321c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum DecompositionOptions {
322c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Not used (meant for LDLT?). */
323c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Pivoting            = 0x01,
324c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal Not used (meant for LDLT?). */
325c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  NoPivoting          = 0x02,
326c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in JacobiSVD to indicate that the square matrix U is to be computed. */
327c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ComputeFullU        = 0x04,
328c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in JacobiSVD to indicate that the thin matrix U is to be computed. */
329c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ComputeThinU        = 0x08,
330c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in JacobiSVD to indicate that the square matrix V is to be computed. */
331c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ComputeFullV        = 0x10,
332c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in JacobiSVD to indicate that the thin matrix V is to be computed. */
333c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ComputeThinV        = 0x20,
334c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify
335c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * that only the eigenvalues are to be computed and not the eigenvectors. */
336c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  EigenvaluesOnly     = 0x40,
337c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify
338c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * that both the eigenvalues and the eigenvectors are to be computed. */
339c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ComputeEigenvectors = 0x80,
340c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal */
341c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  EigVecMask = EigenvaluesOnly | ComputeEigenvectors,
342c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in GeneralizedSelfAdjointEigenSolver to indicate that it should
343c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * solve the generalized eigenproblem \f$ Ax = \lambda B x \f$. */
344c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Ax_lBx              = 0x100,
345c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in GeneralizedSelfAdjointEigenSolver to indicate that it should
346c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * solve the generalized eigenproblem \f$ ABx = \lambda x \f$. */
347c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ABx_lx              = 0x200,
348c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Used in GeneralizedSelfAdjointEigenSolver to indicate that it should
349c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * solve the generalized eigenproblem \f$ BAx = \lambda x \f$. */
350c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  BAx_lx              = 0x400,
351c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** \internal */
352c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  GenEigMask = Ax_lBx | ABx_lx | BAx_lx
353c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
354c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
355c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
356c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Possible values for the \p QRPreconditioner template parameter of JacobiSVD. */
357c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum QRPreconditioners {
358c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Do not specify what is to be done if the SVD of a non-square matrix is asked for. */
359c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  NoQRPreconditioner,
360c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Use a QR decomposition without pivoting as the first step. */
361c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  HouseholderQRPreconditioner,
362c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Use a QR decomposition with column pivoting as the first step. */
363c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  ColPivHouseholderQRPreconditioner,
364c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Use a QR decomposition with full pivoting as the first step. */
365c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  FullPivHouseholderQRPreconditioner
366c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
367c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
368c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#ifdef Success
369c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
370c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#endif
371c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
372c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
373c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum for reporting the status of a computation. */
374c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum ComputationInfo {
375c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Computation was successful. */
376c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Success = 0,
377c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** The provided data did not satisfy the prerequisites. */
378c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  NumericalIssue = 1,
379c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Iterative procedure did not converge. */
380c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  NoConvergence = 2,
381c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** The inputs are invalid, or the algorithm has been improperly called.
382c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * When assertions are enabled, such errors trigger an assert. */
383c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  InvalidInput = 3
384c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
385c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
386c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \ingroup enums
387c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum used to specify how a particular transformation is stored in a matrix.
388c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * \sa Transform, Hyperplane::transform(). */
389c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum TransformTraits {
390c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Transformation is an isometry. */
391c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Isometry      = 0x1,
392c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Transformation is an affine transformation stored as a (Dim+1)^2 matrix whose last row is
393c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    * assumed to be [0 ... 0 1]. */
394c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Affine        = 0x2,
395c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Transformation is an affine transformation stored as a (Dim) x (Dim+1) matrix. */
396c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  AffineCompact = 0x10 | Affine,
397c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  /** Transformation is a general projective transformation stored as a (Dim+1)^2 matrix. */
398c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  Projective    = 0x20
399c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath};
400c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
401c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
402c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum used to choose between implementation depending on the computer architecture. */
403c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathnamespace Architecture
404c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{
405c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  enum Type {
406c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    Generic = 0x0,
407c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    SSE = 0x1,
408c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    AltiVec = 0x2,
409c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#if defined EIGEN_VECTORIZE_SSE
410c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    Target = SSE
411c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#elif defined EIGEN_VECTORIZE_ALTIVEC
412c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    Target = AltiVec
413c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#else
414c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath    Target = Generic
415c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#endif
416c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  };
417c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath}
418c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
419c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
420c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum used as template parameter in GeneralProduct. */
421c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum { CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };
422c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
423c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \internal \ingroup enums
424c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath  * Enum used in experimental parallel implementation. */
425c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathenum Action {GetAction, SetAction};
426c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
427c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** The type used to identify a dense storage. */
428c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathstruct Dense {};
429c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
430c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** The type used to identify a matrix expression */
431c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathstruct MatrixXpr {};
432c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
433c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** The type used to identify an array expression */
434c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathstruct ArrayXpr {};
435c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
436c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} // end namespace Eigen
437c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath
438c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath#endif // EIGEN_CONSTANTS_H
439