// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
...
...
@@ -13,18 +13,31 @@
namespaceEigen{
/** This value means that a quantity is not known at compile-time, and that instead the value is
/** This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is
* stored in some runtime variable.
*
* Changing the value of Dynamic breaks the ABI, as Dynamic is often used as a template parameter for Matrix.
*/
constintDynamic=-1;
/** This value means that a signed quantity (e.g., a signed index) is not known at compile-time, and that instead its value
* has to be specified at runtime.
*/
constintDynamicIndex=0xffffff;
/** This value means +Infinity; it is currently used only as the p parameter to MatrixBase::lpNorm<int>().
* The value Infinity there means the L-infinity norm.
*/
constintInfinity=-1;
/** This value means that the cost to evaluate an expression coefficient is either very expensive or
* cannot be known at compile time.
*
* This value has to be positive to (1) simplify cost computation, and (2) allow to distinguish between a very expensive and very very expensive expressions.
* It thus must also be large enough to make sure unrolling won't happen and that sub expressions will be evaluated, but not too large to avoid overflow.
*/
constintHugeCost=10000;
/** \defgroup flags Flags
* \ingroup Core_Module
*
...
...
@@ -44,18 +57,18 @@ const int Infinity = -1;
* If this bit is not set, the storage order is column-major.
* For an expression, this determines the storage order of
* the matrix created by evaluation of that expression.
* \sa \ref TopicStorageOrders */
* \sa \blank \ref TopicStorageOrders */
constunsignedintRowMajorBit=0x1;
/** \ingroup flags
*
* means the expression should be evaluated by the calling expression */
constunsignedintEvalBeforeNestingBit=0x2;
/** \ingroup flags
*
* \deprecated
* means the expression should be evaluated before any assignment */
* Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed storage format,
* that is, the expression provides:
* \code
inline const Scalar* valuePtr() const;
inline const Index* innerIndexPtr() const;
inline const Index* outerIndexPtr() const;
inline const Index* innerNonZeroPtr() const;
\endcode
*/
constunsignedintCompressedAccessBit=0x400;
// list of flags that are inherited by default
constunsignedintHereditaryBits=RowMajorBit
|EvalBeforeNestingBit
|EvalBeforeAssigningBit;
|EvalBeforeNestingBit;
/** \defgroup enums Enumerations
* \ingroup Core_Module
...
...
@@ -155,9 +197,9 @@ const unsigned int HereditaryBits = RowMajorBit
*/
/** \ingroup enums
* Enum containing possible values for the \p Mode parameter of
* MatrixBase::selfadjointView() and MatrixBase::triangularView(). */
enum{
* Enum containing possible values for the \c Mode or \c UpLo parameter of
* MatrixBase::selfadjointView() and MatrixBase::triangularView(), and selfadjoint solvers. */
enumUpLoType{
/** View matrix as a lower triangular matrix. */
Lower=0x1,
/** View matrix as an upper triangular matrix. */
...
...
@@ -181,12 +223,31 @@ enum {
};
/** \ingroup enums
* Enum for indicating whether an object is aligned or not. */
enum{
/** Object is not correctly aligned for vectorization. */
Unaligned=0,
/** Object is aligned for vectorization. */
Aligned=1
* Enum for indicating whether a buffer is aligned or not. */
enumAlignmentType{
Unaligned=0,/**< Data pointer has no specific alignment. */
Aligned8=8,/**< Data pointer is aligned on a 8 bytes boundary. */
Aligned16=16,/**< Data pointer is aligned on a 16 bytes boundary. */
Aligned32=32,/**< Data pointer is aligned on a 32 bytes boundary. */
Aligned64=64,/**< Data pointer is aligned on a 64 bytes boundary. */
Aligned128=128,/**< Data pointer is aligned on a 128 bytes boundary. */
AlignedMask=255,
Aligned=16,/**< \deprecated Synonym for Aligned16. */
#if EIGEN_MAX_ALIGN_BYTES==128
AlignedMax=Aligned128
#elif EIGEN_MAX_ALIGN_BYTES==64
AlignedMax=Aligned64
#elif EIGEN_MAX_ALIGN_BYTES==32
AlignedMax=Aligned32
#elif EIGEN_MAX_ALIGN_BYTES==16
AlignedMax=Aligned16
#elif EIGEN_MAX_ALIGN_BYTES==8
AlignedMax=Aligned8
#elif EIGEN_MAX_ALIGN_BYTES==0
AlignedMax=Unaligned
#else
#error Invalid value for EIGEN_MAX_ALIGN_BYTES
#endif
};
/** \ingroup enums
...
...
@@ -212,7 +273,7 @@ enum DirectionType {
/** \internal \ingroup enums
* Enum to specify how to traverse the entries of a matrix. */
enum{
enumTraversalType{
/** \internal Default traversal, no vectorization, no index-based access */
DefaultTraversal,
/** \internal No vectorization, use index-based access to have only one for loop instead of 2 nested loops */
...
...
@@ -227,12 +288,14 @@ enum {
* scalar loops to handle the unaligned boundaries */
SliceVectorizedTraversal,
/** \internal Special case to properly handle incompatible scalar types or other defecting cases*/
InvalidTraversal
InvalidTraversal,
/** \internal Evaluate all entries at once */
AllAtOnceTraversal
};
/** \internal \ingroup enums
* Enum to specify whether to unroll loops when traversing over the entries of a matrix. */
enum{
enumUnrollingType{
/** \internal Do not unroll loops. */
NoUnrolling,
/** \internal Unroll only the inner loop, but not the outer loop. */
...
...
@@ -244,7 +307,7 @@ enum {
/** \internal \ingroup enums
* Enum to specify whether to use the default (built-in) implementation or the specialization. */
enum{
enumSpecializedType{
Specialized,
BuiltIn
};
...
...
@@ -252,20 +315,20 @@ enum {
/** \ingroup enums
* Enum containing possible values for the \p _Options template parameter of
* Matrix, Array and BandMatrix. */
enum{
enumStorageOptions{
/** Storage order is column major (see \ref TopicStorageOrders). */
ColMajor=0,
/** Storage order is row major (see \ref TopicStorageOrders). */
RowMajor=0x1,// it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
/** \internal Align the matrix itself if it is vectorizable fixed-size */
/** Align the matrix itself if it is vectorizable fixed-size */
AutoAlign=0,
/** \internal 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
/** 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
DontAlign=0x2
};
/** \ingroup enums
* Enum for specifying whether to apply or solve on the left or right. */
enum{
enumSideType{
/** Apply transformation on the left. */
OnTheLeft=1,
/** Apply transformation on the right. */
...
...
@@ -290,7 +353,7 @@ enum Default_t { Default };
/** \internal \ingroup enums
* Used in AmbiVector. */
enum{
enumAmbiVectorMode{
IsDense=0,
IsSparse
};
...
...
@@ -399,10 +462,16 @@ namespace Architecture
Generic=0x0,
SSE=0x1,
AltiVec=0x2,
VSX=0x3,
NEON=0x4,
#if defined EIGEN_VECTORIZE_SSE
Target=SSE
#elif defined EIGEN_VECTORIZE_ALTIVEC
Target=AltiVec
#elif defined EIGEN_VECTORIZE_VSX
Target=VSX
#elif defined EIGEN_VECTORIZE_NEON
Target=NEON
#else
Target=Generic
#endif
...
...
@@ -410,8 +479,9 @@ namespace Architecture
}
/** \internal \ingroup enums
* Enum used as template parameter in GeneralProduct. */
// Disable the "invalid error number" message that we get with older versions of nvcc
#pragma diag_suppress 1222
// Disable the "calling a __host__ function from a __host__ __device__ function is not allowed" messages (yes, there are many of them and they seem to change with every version of the compiler)
#pragma diag_suppress 2527
#pragma diag_suppress 2529
#pragma diag_suppress 2651
#pragma diag_suppress 2653
#pragma diag_suppress 2668
#pragma diag_suppress 2669
#pragma diag_suppress 2670
#pragma diag_suppress 2671
#pragma diag_suppress 2735
#pragma diag_suppress 2737
#endif
#else
// warnings already disabled:
# ifndef EIGEN_WARNINGS_DISABLED_2
# define EIGEN_WARNINGS_DISABLED_2
# elif defined(EIGEN_INTERNAL_DEBUGGING)
# error "Do not include \"DisableStupidWarnings.h\" recursively more than twice!"