Skip to content

Commit 0488b0f

Browse files
committed
- update to Eigen 3.2.5
1 parent 34b1fdc commit 0488b0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+792
-411
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set(PROJECT_PATH ${PROJECT_SOURCE_DIR})
66
include_directories(${PROJECT_SOURCE_DIR})
77

88
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
9+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
910

1011
include(${PROJECT_PATH}/CMake/Common.cmake)
1112

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- update to Eigen 3.2.5
2+
- resolve compiler errors in Visual Studio 2010
3+
14
1.2.0
25
- added rigid body demo
36
- added balljoint constraint

extern/eigen/Eigen/Core

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
#undef bool
124124
#undef vector
125125
#undef pixel
126-
#elif defined __ARM_NEON__
126+
#elif defined __ARM_NEON
127127
#define EIGEN_VECTORIZE
128128
#define EIGEN_VECTORIZE_NEON
129129
#include <arm_neon.h>

extern/eigen/Eigen/src/Cholesky/LDLT.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ template<typename _MatrixType, int _UpLo> class LDLT
235235
}
236236

237237
protected:
238+
239+
static void check_template_parameters()
240+
{
241+
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);
242+
}
238243

239244
/** \internal
240245
* Used to compute and store the Cholesky decomposition A = L D L^* = U^* D U.
@@ -434,6 +439,8 @@ template<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>
434439
template<typename MatrixType, int _UpLo>
435440
LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::compute(const MatrixType& a)
436441
{
442+
check_template_parameters();
443+
437444
eigen_assert(a.rows()==a.cols());
438445
const Index size = a.rows();
439446

extern/eigen/Eigen/src/Cholesky/LLT.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ template<typename _MatrixType, int _UpLo> class LLT
174174
LLT rankUpdate(const VectorType& vec, const RealScalar& sigma = 1);
175175

176176
protected:
177+
178+
static void check_template_parameters()
179+
{
180+
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);
181+
}
182+
177183
/** \internal
178184
* Used to compute and store L
179185
* The strict upper part is not used and even not initialized.
@@ -384,6 +390,8 @@ template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
384390
template<typename MatrixType, int _UpLo>
385391
LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const MatrixType& a)
386392
{
393+
check_template_parameters();
394+
387395
eigen_assert(a.rows()==a.cols());
388396
const Index size = a.rows();
389397
m_matrix.resize(size, size);

extern/eigen/Eigen/src/Cholesky/LLT_MKL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ template<> struct mkl_llt<EIGTYPE> \
6060
lda = m.outerStride(); \
6161
\
6262
info = LAPACKE_##MKLPREFIX##potrf( matrix_order, uplo, size, (MKLTYPE*)a, lda ); \
63-
info = (info==0) ? Success : NumericalIssue; \
63+
info = (info==0) ? -1 : info>0 ? info-1 : size; \
6464
return info; \
6565
} \
6666
}; \

extern/eigen/Eigen/src/Core/Assign.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,19 +439,26 @@ struct assign_impl<Derived1, Derived2, SliceVectorizedTraversal, NoUnrolling, Ve
439439
typedef typename Derived1::Index Index;
440440
static inline void run(Derived1 &dst, const Derived2 &src)
441441
{
442-
typedef packet_traits<typename Derived1::Scalar> PacketTraits;
442+
typedef typename Derived1::Scalar Scalar;
443+
typedef packet_traits<Scalar> PacketTraits;
443444
enum {
444445
packetSize = PacketTraits::size,
445446
alignable = PacketTraits::AlignedOnScalar,
446-
dstAlignment = alignable ? Aligned : int(assign_traits<Derived1,Derived2>::DstIsAligned) ,
447+
dstIsAligned = assign_traits<Derived1,Derived2>::DstIsAligned,
448+
dstAlignment = alignable ? Aligned : int(dstIsAligned),
447449
srcAlignment = assign_traits<Derived1,Derived2>::JointAlignment
448450
};
451+
const Scalar *dst_ptr = &dst.coeffRef(0,0);
452+
if((!bool(dstIsAligned)) && (Index(dst_ptr) % sizeof(Scalar))>0)
453+
{
454+
// the pointer is not aligend-on scalar, so alignment is not possible
455+
return assign_impl<Derived1,Derived2,DefaultTraversal,NoUnrolling>::run(dst, src);
456+
}
449457
const Index packetAlignedMask = packetSize - 1;
450458
const Index innerSize = dst.innerSize();
451459
const Index outerSize = dst.outerSize();
452460
const Index alignedStep = alignable ? (packetSize - dst.outerStride() % packetSize) & packetAlignedMask : 0;
453-
Index alignedStart = ((!alignable) || assign_traits<Derived1,Derived2>::DstIsAligned) ? 0
454-
: internal::first_aligned(&dst.coeffRef(0,0), innerSize);
461+
Index alignedStart = ((!alignable) || bool(dstIsAligned)) ? 0 : internal::first_aligned(dst_ptr, innerSize);
455462

456463
for(Index outer = 0; outer < outerSize; ++outer)
457464
{

extern/eigen/Eigen/src/Core/Block.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ struct traits<Block<XprType, BlockRows, BlockCols, InnerPanel> > : traits<XprTyp
6666
: ColsAtCompileTime != Dynamic ? int(ColsAtCompileTime)
6767
: int(traits<XprType>::MaxColsAtCompileTime),
6868
XprTypeIsRowMajor = (int(traits<XprType>::Flags)&RowMajorBit) != 0,
69-
IsRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
70-
: (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
69+
IsDense = is_same<StorageKind,Dense>::value,
70+
IsRowMajor = (IsDense&&MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
71+
: (IsDense&&MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
7172
: XprTypeIsRowMajor,
7273
HasSameStorageOrderAsXprType = (IsRowMajor == XprTypeIsRowMajor),
7374
InnerSize = IsRowMajor ? int(ColsAtCompileTime) : int(RowsAtCompileTime),

extern/eigen/Eigen/src/Core/DenseBase.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,13 @@ template<typename Derived> class DenseBase
266266
template<typename OtherDerived>
267267
Derived& operator=(const ReturnByValue<OtherDerived>& func);
268268

269-
#ifndef EIGEN_PARSED_BY_DOXYGEN
270-
/** Copies \a other into *this without evaluating other. \returns a reference to *this. */
269+
/** \internal Copies \a other into *this without evaluating other. \returns a reference to *this. */
271270
template<typename OtherDerived>
272271
Derived& lazyAssign(const DenseBase<OtherDerived>& other);
273-
#endif // not EIGEN_PARSED_BY_DOXYGEN
272+
273+
/** \internal Evaluates \a other into *this. \returns a reference to *this. */
274+
template<typename OtherDerived>
275+
Derived& lazyAssign(const ReturnByValue<OtherDerived>& other);
274276

275277
CommaInitializer<Derived> operator<< (const Scalar& s);
276278

extern/eigen/Eigen/src/Core/DiagonalProduct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> >
3434
_Vectorizable = bool(int(MatrixType::Flags)&PacketAccessBit) && _SameTypes && (_ScalarAccessOnDiag || (bool(int(DiagonalType::DiagonalVectorType::Flags)&PacketAccessBit))),
3535
_LinearAccessMask = (RowsAtCompileTime==1 || ColsAtCompileTime==1) ? LinearAccessBit : 0,
3636

37-
Flags = ((HereditaryBits|_LinearAccessMask) & (unsigned int)(MatrixType::Flags)) | (_Vectorizable ? PacketAccessBit : 0) | AlignedBit,//(int(MatrixType::Flags)&int(DiagonalType::DiagonalVectorType::Flags)&AlignedBit),
37+
Flags = ((HereditaryBits|_LinearAccessMask|AlignedBit) & (unsigned int)(MatrixType::Flags)) | (_Vectorizable ? PacketAccessBit : 0),//(int(MatrixType::Flags)&int(DiagonalType::DiagonalVectorType::Flags)&AlignedBit),
3838
CoeffReadCost = NumTraits<Scalar>::MulCost + MatrixType::CoeffReadCost + DiagonalType::DiagonalVectorType::CoeffReadCost
3939
};
4040
};

0 commit comments

Comments
 (0)