mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Pulled latest updates from upstream
This commit is contained in:
commit
769208a17f
@ -14,7 +14,7 @@
|
||||
#include "Core"
|
||||
#include <deque>
|
||||
|
||||
#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 /* MSVC auto aligns in 64 bit builds */
|
||||
#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */
|
||||
|
||||
#define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...)
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "Core"
|
||||
#include <list>
|
||||
|
||||
#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 /* MSVC auto aligns in 64 bit builds */
|
||||
#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */
|
||||
|
||||
#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...)
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "Core"
|
||||
#include <vector>
|
||||
|
||||
#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 /* MSVC auto aligns in 64 bit builds */
|
||||
#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */
|
||||
|
||||
#define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...)
|
||||
|
||||
|
@ -515,7 +515,7 @@ struct dense_assignment_loop<Kernel, LinearTraversal, CompleteUnrolling>
|
||||
template<typename Kernel>
|
||||
struct dense_assignment_loop<Kernel, SliceVectorizedTraversal, NoUnrolling>
|
||||
{
|
||||
EIGEN_DEVICE_FUNC static inline void run(Kernel &kernel)
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)
|
||||
{
|
||||
typedef typename Kernel::Scalar Scalar;
|
||||
typedef typename Kernel::PacketType PacketType;
|
||||
@ -563,7 +563,7 @@ struct dense_assignment_loop<Kernel, SliceVectorizedTraversal, NoUnrolling>
|
||||
template<typename Kernel>
|
||||
struct dense_assignment_loop<Kernel, SliceVectorizedTraversal, InnerUnrolling>
|
||||
{
|
||||
EIGEN_DEVICE_FUNC static inline void run(Kernel &kernel)
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)
|
||||
{
|
||||
typedef typename Kernel::DstEvaluatorType::XprType DstXprType;
|
||||
typedef typename Kernel::PacketType PacketType;
|
||||
|
@ -104,13 +104,14 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
|
||||
// - the sizes are large enough
|
||||
|
||||
// compute the maximal number of threads from the size of the product:
|
||||
// FIXME this has to be fine tuned
|
||||
// This first heuristic takes into account that the product kernel is fully optimized when working with nr columns at once.
|
||||
Index size = transpose ? rows : cols;
|
||||
Index pb_max_threads = std::max<Index>(1,size / 32);
|
||||
Index pb_max_threads = std::max<Index>(1,size / Functor::Traits::nr);
|
||||
|
||||
// compute the maximal number of threads from the total amount of work:
|
||||
double work = static_cast<double>(rows) * static_cast<double>(cols) *
|
||||
static_cast<double>(depth);
|
||||
double kMinTaskSize = 50000; // Heuristic.
|
||||
double kMinTaskSize = 50000; // FIXME improve this heuristic.
|
||||
pb_max_threads = std::max<Index>(1, std::min<Index>(pb_max_threads, work / kMinTaskSize));
|
||||
|
||||
// compute the number of threads we are going to use
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC
|
||||
#ifdef __GNUC__
|
||||
#define EIGEN_COMP_GNUC 1
|
||||
#define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__)
|
||||
#else
|
||||
#define EIGEN_COMP_GNUC 0
|
||||
#endif
|
||||
@ -80,8 +80,8 @@
|
||||
// 2015 14 1900
|
||||
// "15" 15 1900
|
||||
|
||||
/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC
|
||||
#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC)
|
||||
/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC or clang-cl
|
||||
#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC || EIGEN_COMP_LLVM || EIGEN_COMP_CLANG)
|
||||
#define EIGEN_COMP_MSVC_STRICT _MSC_VER
|
||||
#else
|
||||
#define EIGEN_COMP_MSVC_STRICT 0
|
||||
@ -349,6 +349,12 @@
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if !( EIGEN_COMP_CLANG && ((EIGEN_COMP_CLANG<309) || defined(__apple_build_version__)) || EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<49)
|
||||
#define EIGEN_HAS_INDEXED_VIEW 1
|
||||
#else
|
||||
#define EIGEN_HAS_INDEXED_VIEW 0
|
||||
#endif
|
||||
|
||||
// Upperbound on the C++ version to use.
|
||||
// Expected values are 03, 11, 14, 17, etc.
|
||||
// By default, let's use an arbitrarily large C++ version.
|
||||
|
@ -250,7 +250,7 @@ template<typename _MatrixType> class ComplexEigenSolver
|
||||
EigenvectorType m_matX;
|
||||
|
||||
private:
|
||||
void doComputeEigenvectors(const RealScalar& matrixnorm);
|
||||
void doComputeEigenvectors(RealScalar matrixnorm);
|
||||
void sortEigenvalues(bool computeEigenvectors);
|
||||
};
|
||||
|
||||
@ -284,10 +284,12 @@ ComplexEigenSolver<MatrixType>::compute(const EigenBase<InputType>& matrix, bool
|
||||
|
||||
|
||||
template<typename MatrixType>
|
||||
void ComplexEigenSolver<MatrixType>::doComputeEigenvectors(const RealScalar& matrixnorm)
|
||||
void ComplexEigenSolver<MatrixType>::doComputeEigenvectors(RealScalar matrixnorm)
|
||||
{
|
||||
const Index n = m_eivalues.size();
|
||||
|
||||
matrixnorm = numext::maxi(matrixnorm,(std::numeric_limits<RealScalar>::min)());
|
||||
|
||||
// Compute X such that T = X D X^(-1), where D is the diagonal of T.
|
||||
// The matrix X is unit triangular.
|
||||
m_matX = EigenvectorType::Zero(n, n);
|
||||
|
@ -248,12 +248,24 @@ template<typename MatrixType>
|
||||
template<typename InputType>
|
||||
RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const EigenBase<InputType>& matrix, bool computeU)
|
||||
{
|
||||
const Scalar considerAsZero = (std::numeric_limits<Scalar>::min)();
|
||||
|
||||
eigen_assert(matrix.cols() == matrix.rows());
|
||||
Index maxIters = m_maxIters;
|
||||
if (maxIters == -1)
|
||||
maxIters = m_maxIterationsPerRow * matrix.rows();
|
||||
|
||||
Scalar scale = matrix.derived().cwiseAbs().maxCoeff();
|
||||
if(scale<considerAsZero)
|
||||
{
|
||||
m_matT.setZero(matrix.rows(),matrix.cols());
|
||||
if(computeU)
|
||||
m_matU.setIdentity(matrix.rows(),matrix.cols());
|
||||
m_info = Success;
|
||||
m_isInitialized = true;
|
||||
m_matUisUptodate = computeU;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Step 1. Reduce to Hessenberg form
|
||||
m_hess.compute(matrix.derived()/scale);
|
||||
|
@ -200,10 +200,12 @@ public:
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
|
||||
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
|
||||
Options = MatrixType::Options
|
||||
TrOptions = RowsAtCompileTime==1 ? (MatrixType::Options & ~(RowMajor))
|
||||
: ColsAtCompileTime==1 ? (MatrixType::Options | RowMajor)
|
||||
: MatrixType::Options
|
||||
};
|
||||
|
||||
typedef Matrix<Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime>
|
||||
typedef Matrix<Scalar, ColsAtCompileTime, RowsAtCompileTime, TrOptions, MaxColsAtCompileTime, MaxRowsAtCompileTime>
|
||||
TransposeTypeWithSameStorageOrder;
|
||||
|
||||
void allocate(const JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>& svd)
|
||||
|
@ -336,7 +336,7 @@ class AmbiVector<_Scalar,_StorageIndex>::Iterator
|
||||
{
|
||||
do {
|
||||
++m_cachedIndex;
|
||||
} while (m_cachedIndex<m_vector.m_end && abs(m_vector.m_buffer[m_cachedIndex])<m_epsilon);
|
||||
} while (m_cachedIndex<m_vector.m_end && abs(m_vector.m_buffer[m_cachedIndex])<=m_epsilon);
|
||||
if (m_cachedIndex<m_vector.m_end)
|
||||
m_cachedValue = m_vector.m_buffer[m_cachedIndex];
|
||||
else
|
||||
@ -347,7 +347,7 @@ class AmbiVector<_Scalar,_StorageIndex>::Iterator
|
||||
ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_vector.m_buffer);
|
||||
do {
|
||||
m_currentEl = llElements[m_currentEl].next;
|
||||
} while (m_currentEl>=0 && abs(llElements[m_currentEl].value)<m_epsilon);
|
||||
} while (m_currentEl>=0 && abs(llElements[m_currentEl].value)<=m_epsilon);
|
||||
if (m_currentEl<0)
|
||||
{
|
||||
m_cachedIndex = -1;
|
||||
@ -363,9 +363,9 @@ class AmbiVector<_Scalar,_StorageIndex>::Iterator
|
||||
|
||||
protected:
|
||||
const AmbiVector& m_vector; // the target vector
|
||||
StorageIndex m_currentEl; // the current element in sparse/linked-list mode
|
||||
StorageIndex m_currentEl; // the current element in sparse/linked-list mode
|
||||
RealScalar m_epsilon; // epsilon used to prune zero coefficients
|
||||
StorageIndex m_cachedIndex; // current coordinate
|
||||
StorageIndex m_cachedIndex; // current coordinate
|
||||
Scalar m_cachedValue; // current value
|
||||
bool m_isDense; // mode of the vector
|
||||
};
|
||||
|
@ -78,8 +78,8 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
|
||||
///
|
||||
/// \sa class Block, fix, fix<N>(int)
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -92,8 +92,8 @@ block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
|
||||
}
|
||||
|
||||
/// This is the const version of block(Index,Index,NRowsType,NColsType)
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -124,8 +124,8 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -138,8 +138,8 @@ topRightCorner(NRowsType cRows, NColsType cCols)
|
||||
}
|
||||
|
||||
/// This is the const version of topRightCorner(NRowsType, NColsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -229,8 +229,8 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -243,8 +243,8 @@ topLeftCorner(NRowsType cRows, NColsType cCols)
|
||||
}
|
||||
|
||||
/// This is the const version of topLeftCorner(Index, Index).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -333,8 +333,8 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -348,8 +348,8 @@ bottomRightCorner(NRowsType cRows, NColsType cCols)
|
||||
}
|
||||
|
||||
/// This is the const version of bottomRightCorner(NRowsType, NColsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -439,8 +439,8 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -454,8 +454,8 @@ bottomLeftCorner(NRowsType cRows, NColsType cCols)
|
||||
}
|
||||
|
||||
/// This is the const version of bottomLeftCorner(NRowsType, NColsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType, typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -544,8 +544,8 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
|
||||
#else
|
||||
@ -558,8 +558,8 @@ topRows(NRowsType n)
|
||||
}
|
||||
|
||||
/// This is the const version of topRows(NRowsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
|
||||
#else
|
||||
@ -619,8 +619,8 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
|
||||
#else
|
||||
@ -633,8 +633,8 @@ bottomRows(NRowsType n)
|
||||
}
|
||||
|
||||
/// This is the const version of bottomRows(NRowsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
|
||||
#else
|
||||
@ -695,8 +695,8 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
|
||||
#else
|
||||
@ -709,8 +709,8 @@ middleRows(Index startRow, NRowsType n)
|
||||
}
|
||||
|
||||
/// This is the const version of middleRows(Index,NRowsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NRowsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
|
||||
#else
|
||||
@ -771,8 +771,8 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -785,8 +785,8 @@ leftCols(NColsType n)
|
||||
}
|
||||
|
||||
/// This is the const version of leftCols(NColsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -846,8 +846,8 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -860,8 +860,8 @@ rightCols(NColsType n)
|
||||
}
|
||||
|
||||
/// This is the const version of rightCols(NColsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -922,8 +922,8 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -936,8 +936,8 @@ middleCols(Index startCol, NColsType numCols)
|
||||
}
|
||||
|
||||
/// This is the const version of middleCols(Index,NColsType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NColsType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
|
||||
#else
|
||||
@ -1130,8 +1130,8 @@ inline ConstRowXpr row(Index i) const
|
||||
///
|
||||
/// \sa block(Index,Index,NRowsType,NColsType), fix<N>, fix<N>(int), class Block
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
|
||||
#else
|
||||
@ -1146,8 +1146,8 @@ segment(Index start, NType n)
|
||||
|
||||
|
||||
/// This is the const version of segment(Index,NType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
|
||||
#else
|
||||
@ -1180,8 +1180,8 @@ segment(Index start, NType n) const
|
||||
///
|
||||
/// \sa class Block, block(Index,Index)
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
|
||||
#else
|
||||
@ -1195,8 +1195,8 @@ head(NType n)
|
||||
}
|
||||
|
||||
/// This is the const version of head(NType).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
|
||||
#else
|
||||
@ -1229,8 +1229,8 @@ head(NType n) const
|
||||
///
|
||||
/// \sa class Block, block(Index,Index)
|
||||
///
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
|
||||
#else
|
||||
@ -1244,8 +1244,8 @@ tail(NType n)
|
||||
}
|
||||
|
||||
/// This is the const version of tail(Index).
|
||||
EIGEN_DEVICE_FUNC
|
||||
template<typename NType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
inline const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
|
||||
#else
|
||||
|
@ -7,7 +7,7 @@
|
||||
// Public License v. 2.0. If a copy of the MPL was not distributed
|
||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
#if !defined(EIGEN_PARSED_BY_DOXYGEN) && EIGEN_HAS_INDEXED_VIEW
|
||||
|
||||
// This file is automatically included twice to generate const and non-const versions
|
||||
|
||||
@ -256,5 +256,4 @@ template<typename Indices>
|
||||
IndexedView_or_VectorBlock
|
||||
operator()(const Indices& indices);
|
||||
|
||||
#endif // EIGEN_PARSED_BY_DOXYGEN
|
||||
|
||||
#endif // EIGEN_PARSED_BY_DOXYGEN && EIGEN_HAS_INDEXED_VIEW
|
||||
|
@ -131,6 +131,15 @@ template<typename MatrixType> void eigensolver(const MatrixType& m)
|
||||
ComplexEigenSolver<MatrixType> eig(a.adjoint() * a);
|
||||
eig.compute(a.adjoint() * a);
|
||||
}
|
||||
|
||||
// regression test for bug 478
|
||||
{
|
||||
a.setZero();
|
||||
ComplexEigenSolver<MatrixType> ei3(a);
|
||||
VERIFY_IS_EQUAL(ei3.info(), Success);
|
||||
VERIFY_IS_MUCH_SMALLER_THAN(ei3.eigenvalues().norm(),RealScalar(1));
|
||||
VERIFY((ei3.eigenvectors().transpose()*ei3.eigenvectors().transpose()).eval().isIdentity());
|
||||
}
|
||||
}
|
||||
|
||||
template<typename MatrixType> void eigensolver_verify_assert(const MatrixType& m)
|
||||
|
@ -76,6 +76,15 @@ template<typename MatrixType> void eigensolver(const MatrixType& m)
|
||||
EigenSolver<MatrixType> eig(a.adjoint() * a);
|
||||
eig.compute(a.adjoint() * a);
|
||||
}
|
||||
|
||||
// regression test for bug 478
|
||||
{
|
||||
a.setZero();
|
||||
EigenSolver<MatrixType> ei3(a);
|
||||
VERIFY_IS_EQUAL(ei3.info(), Success);
|
||||
VERIFY_IS_MUCH_SMALLER_THAN(ei3.eigenvalues().norm(),RealScalar(1));
|
||||
VERIFY((ei3.eigenvectors().transpose()*ei3.eigenvectors().transpose()).eval().isIdentity());
|
||||
}
|
||||
}
|
||||
|
||||
template<typename MatrixType> void eigensolver_verify_assert(const MatrixType& m)
|
||||
|
@ -180,6 +180,15 @@ template<typename MatrixType> void selfadjointeigensolver(const MatrixType& m)
|
||||
SelfAdjointEigenSolver<MatrixType> eig(a.adjoint() * a);
|
||||
eig.compute(a.adjoint() * a);
|
||||
}
|
||||
|
||||
// regression test for bug 478
|
||||
{
|
||||
a.setZero();
|
||||
SelfAdjointEigenSolver<MatrixType> ei3(a);
|
||||
VERIFY_IS_EQUAL(ei3.info(), Success);
|
||||
VERIFY_IS_MUCH_SMALLER_THAN(ei3.eigenvalues().norm(),RealScalar(1));
|
||||
VERIFY((ei3.eigenvectors().transpose()*ei3.eigenvectors().transpose()).eval().isIdentity());
|
||||
}
|
||||
}
|
||||
|
||||
template<int>
|
||||
|
@ -79,6 +79,7 @@ is_same_seq_type(const T1& a, const T2& b)
|
||||
|
||||
void check_indexed_view()
|
||||
{
|
||||
#if EIGEN_HAS_INDEXED_VIEW
|
||||
using Eigen::placeholders::all;
|
||||
using Eigen::placeholders::last;
|
||||
using Eigen::placeholders::end;
|
||||
@ -297,7 +298,6 @@ void check_indexed_view()
|
||||
|
||||
VERIFY_IS_APPROX( (A(std::array<int,3>{{1,3,5}}, std::array<int,4>{{9,6,3,0}})), A(seqN(1,3,2), seqN(9,4,-3)) );
|
||||
|
||||
#if (!EIGEN_COMP_CLANG) || (EIGEN_COMP_CLANG>=308 && !defined(__apple_build_version__))
|
||||
VERIFY_IS_APPROX( A({3, 1, 6, 5}, all), A(std::array<int,4>{{3, 1, 6, 5}}, all) );
|
||||
VERIFY_IS_APPROX( A(all,{3, 1, 6, 5}), A(all,std::array<int,4>{{3, 1, 6, 5}}) );
|
||||
VERIFY_IS_APPROX( A({1,3,5},{3, 1, 6, 5}), A(std::array<int,3>{{1,3,5}},std::array<int,4>{{3, 1, 6, 5}}) );
|
||||
@ -310,7 +310,6 @@ void check_indexed_view()
|
||||
|
||||
VERIFY_IS_APPROX( b({3, 1, 6, 5}), b(std::array<int,4>{{3, 1, 6, 5}}) );
|
||||
VERIFY_IS_EQUAL( b({1,3,5}).SizeAtCompileTime, 3 );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -366,6 +365,7 @@ void check_indexed_view()
|
||||
VERIFY( is_same_eq( cA.middleRows<3>(1), cA.middleRows(1,fix<3>)) );
|
||||
}
|
||||
|
||||
#endif // EIGEN_HAS_INDEXED_VIEW
|
||||
}
|
||||
|
||||
void test_indexed_view()
|
||||
|
@ -64,9 +64,9 @@ void pack_simple(Scalar * dst, const Scalar * src, Index cols, Index rows, Index
|
||||
template<typename LhsScalar, typename RhsScalar, typename Scalar>
|
||||
struct libxsmm_wrapper {
|
||||
libxsmm_wrapper() {}
|
||||
libxsmm_wrapper(int flags, int m, int n, int k, int lda, int ldb, int ldc, float alpha, float beta, int prefetch) {}
|
||||
void operator()(const LhsScalar* a, const RhsScalar* b, Scalar* c) {}
|
||||
void operator()(const LhsScalar* a, const RhsScalar* b, Scalar* c, const LhsScalar* ap, const RhsScalar* bp, const Scalar* cp) {}
|
||||
libxsmm_wrapper(int, int, int, int, int, int, int, float, float, int) {}
|
||||
void operator()(const LhsScalar*, const RhsScalar*, Scalar*) {}
|
||||
void operator()(const LhsScalar*, const RhsScalar*, Scalar*, const LhsScalar*, const RhsScalar*, const Scalar*) {}
|
||||
};
|
||||
|
||||
template<>
|
||||
@ -682,10 +682,9 @@ protected:
|
||||
}
|
||||
|
||||
m_can_use_xsmm = true;
|
||||
#else
|
||||
// silence the compiler warning
|
||||
(void) eval_op_indices;
|
||||
#endif
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(eval_op_indices);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(EIGEN_VECTORIZE_AVX) && defined(EIGEN_USE_LIBXSMM)
|
||||
|
Loading…
x
Reference in New Issue
Block a user