diff --git a/Eigen/CholmodSupport b/Eigen/CholmodSupport
index 745b884..88c29a6 100644
--- a/Eigen/CholmodSupport
+++ b/Eigen/CholmodSupport
@@ -12,7 +12,7 @@ extern "C" {
/** \ingroup Support_modules
* \defgroup CholmodSupport_Module CholmodSupport module
*
- * This module provides an interface to the Cholmod library which is part of the suitesparse package.
+ * This module provides an interface to the Cholmod library which is part of the suitesparse package.
* It provides the two following main factorization classes:
* - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
* - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
diff --git a/Eigen/SPQRSupport b/Eigen/SPQRSupport
index 7701644..7f1eb47 100644
--- a/Eigen/SPQRSupport
+++ b/Eigen/SPQRSupport
@@ -10,7 +10,7 @@
/** \ingroup Support_modules
* \defgroup SPQRSupport_Module SuiteSparseQR module
*
- * This module provides an interface to the SPQR library, which is part of the suitesparse package.
+ * This module provides an interface to the SPQR library, which is part of the suitesparse package.
*
* \code
* #include
diff --git a/Eigen/SparseCore b/Eigen/SparseCore
index 9b5be5e..24bcf01 100644
--- a/Eigen/SparseCore
+++ b/Eigen/SparseCore
@@ -14,7 +14,7 @@
/**
* \defgroup SparseCore_Module SparseCore module
*
- * This module provides a sparse matrix representation, and basic associatd matrix manipulations
+ * This module provides a sparse matrix representation, and basic associated matrix manipulations
* and operations.
*
* See the \ref TutorialSparse "Sparse tutorial"
diff --git a/Eigen/UmfPackSupport b/Eigen/UmfPackSupport
index 984f64a..7b1b660 100644
--- a/Eigen/UmfPackSupport
+++ b/Eigen/UmfPackSupport
@@ -12,7 +12,7 @@ extern "C" {
/** \ingroup Support_modules
* \defgroup UmfPackSupport_Module UmfPackSupport module
*
- * This module provides an interface to the UmfPack library which is part of the suitesparse package.
+ * This module provides an interface to the UmfPack library which is part of the suitesparse package.
* It provides the following factorization class:
* - class UmfPackLU: a multifrontal sequential LU factorization.
*
diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h
index 59723a6..7c11a2d 100644
--- a/Eigen/src/Cholesky/LLT.h
+++ b/Eigen/src/Cholesky/LLT.h
@@ -289,7 +289,7 @@ template struct llt_inplace
return k;
mat.coeffRef(k,k) = x = sqrt(x);
if (k>0 && rs>0) A21.noalias() -= A20 * A10.adjoint();
- if (rs>0) A21 *= RealScalar(1)/x;
+ if (rs>0) A21 /= x;
}
return -1;
}
diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h
index c449960..99dbe17 100644
--- a/Eigen/src/CholmodSupport/CholmodSupport.h
+++ b/Eigen/src/CholmodSupport/CholmodSupport.h
@@ -78,7 +78,7 @@ cholmod_sparse viewAsCholmod(SparseMatrix<_Scalar,_Options,_Index>& mat)
{
res.itype = CHOLMOD_INT;
}
- else if (internal::is_same<_Index,UF_long>::value)
+ else if (internal::is_same<_Index,SuiteSparse_long>::value)
{
res.itype = CHOLMOD_LONG;
}
@@ -395,7 +395,7 @@ class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimpl
CholmodSimplicialLLT(const MatrixType& matrix) : Base()
{
init();
- compute(matrix);
+ Base::compute(matrix);
}
~CholmodSimplicialLLT() {}
@@ -442,7 +442,7 @@ class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimp
CholmodSimplicialLDLT(const MatrixType& matrix) : Base()
{
init();
- compute(matrix);
+ Base::compute(matrix);
}
~CholmodSimplicialLDLT() {}
@@ -487,7 +487,7 @@ class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSuper
CholmodSupernodalLLT(const MatrixType& matrix) : Base()
{
init();
- compute(matrix);
+ Base::compute(matrix);
}
~CholmodSupernodalLLT() {}
@@ -534,7 +534,7 @@ class CholmodDecomposition : public CholmodBase<_MatrixType, _UpLo, CholmodDecom
CholmodDecomposition(const MatrixType& matrix) : Base()
{
init();
- compute(matrix);
+ Base::compute(matrix);
}
~CholmodDecomposition() {}
diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h
index 0ab03ef..0b9c38c 100644
--- a/Eigen/src/Core/Array.h
+++ b/Eigen/src/Core/Array.h
@@ -124,6 +124,21 @@ class Array
}
#endif
+#ifdef EIGEN_HAVE_RVALUE_REFERENCES
+ Array(Array&& other)
+ : Base(std::move(other))
+ {
+ Base::_check_template_params();
+ if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic)
+ Base::_set_noalias(other);
+ }
+ Array& operator=(Array&& other)
+ {
+ other.swap(*this);
+ return *this;
+ }
+#endif
+
/** Constructs a vector or row-vector with given dimension. \only_for_vectors
*
* Note that this is only useful for dynamic-size vectors. For fixed-size vectors,
diff --git a/Eigen/src/Core/ArrayBase.h b/Eigen/src/Core/ArrayBase.h
index 3885260..33ff553 100644
--- a/Eigen/src/Core/ArrayBase.h
+++ b/Eigen/src/Core/ArrayBase.h
@@ -46,9 +46,6 @@ template class ArrayBase
typedef ArrayBase Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl;
- using internal::special_scalar_op_base::Scalar,
- typename NumTraits::Scalar>::Real>::operator*;
-
typedef typename internal::traits::StorageKind StorageKind;
typedef typename internal::traits::Index Index;
typedef typename internal::traits::Scalar Scalar;
@@ -56,6 +53,7 @@ template class ArrayBase
typedef typename NumTraits::Real RealScalar;
typedef DenseBase Base;
+ using Base::operator*;
using Base::RowsAtCompileTime;
using Base::ColsAtCompileTime;
using Base::SizeAtCompileTime;
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index a036d8c..56ee38f 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -76,8 +76,11 @@ struct CommaInitializer
template
CommaInitializer& operator,(const DenseBase& other)
{
- if(other.cols()==0 || other.rows()==0)
+ if(other.rows()==0)
+ {
+ m_col += other.cols();
return *this;
+ }
if (m_col==m_xpr.cols())
{
m_row+=m_currentBlockRows;
@@ -86,7 +89,7 @@ struct CommaInitializer
eigen_assert(m_row+m_currentBlockRows<=m_xpr.rows()
&& "Too many rows passed to comma initializer (operator<<)");
}
- eigen_assert(m_col >
)
),
Flags = (Flags0 & ~RowMajorBit) | (LhsFlags & RowMajorBit),
- CoeffReadCost = LhsCoeffReadCost + RhsCoeffReadCost + functor_traits::Cost
+ Cost0 = EIGEN_ADD_COST(LhsCoeffReadCost,RhsCoeffReadCost),
+ CoeffReadCost = EIGEN_ADD_COST(Cost0,functor_traits::Cost)
};
};
} // end namespace internal
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h
index f2de749..f7ee60e 100644
--- a/Eigen/src/Core/CwiseUnaryOp.h
+++ b/Eigen/src/Core/CwiseUnaryOp.h
@@ -47,7 +47,7 @@ struct traits >
Flags = _XprTypeNested::Flags & (
HereditaryBits | LinearAccessBit | AlignedBit
| (functor_traits::PacketAccess ? PacketAccessBit : 0)),
- CoeffReadCost = _XprTypeNested::CoeffReadCost + functor_traits::Cost
+ CoeffReadCost = EIGEN_ADD_COST(_XprTypeNested::CoeffReadCost, functor_traits::Cost)
};
};
}
diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h
index b2638d3..f3b2ffe 100644
--- a/Eigen/src/Core/CwiseUnaryView.h
+++ b/Eigen/src/Core/CwiseUnaryView.h
@@ -38,7 +38,7 @@ struct traits >
typedef typename remove_all::type _MatrixTypeNested;
enum {
Flags = (traits<_MatrixTypeNested>::Flags & (HereditaryBits | LvalueBit | LinearAccessBit | DirectAccessBit)),
- CoeffReadCost = traits<_MatrixTypeNested>::CoeffReadCost + functor_traits::Cost,
+ CoeffReadCost = EIGEN_ADD_COST(traits<_MatrixTypeNested>::CoeffReadCost, functor_traits::Cost),
MatrixTypeInnerStride = inner_stride_at_compile_time::ret,
// need to cast the sizeof's from size_t to int explicitly, otherwise:
// "error: no integral type can represent all of the enumerator values
diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h
index dc20e54..4b371b0 100644
--- a/Eigen/src/Core/DenseBase.h
+++ b/Eigen/src/Core/DenseBase.h
@@ -40,15 +40,14 @@ static inline void check_DenseIndex_is_signed() {
*/
template class DenseBase
#ifndef EIGEN_PARSED_BY_DOXYGEN
- : public internal::special_scalar_op_base::Scalar,
- typename NumTraits::Scalar>::Real>
+ : public internal::special_scalar_op_base::Scalar,
+ typename NumTraits::Scalar>::Real,
+ DenseCoeffsBase >
#else
: public DenseCoeffsBase
#endif // not EIGEN_PARSED_BY_DOXYGEN
{
public:
- using internal::special_scalar_op_base::Scalar,
- typename NumTraits::Scalar>::Real>::operator*;
class InnerIterator;
@@ -63,8 +62,9 @@ template class DenseBase
typedef typename internal::traits::Scalar Scalar;
typedef typename internal::packet_traits::type PacketScalar;
typedef typename NumTraits::Real RealScalar;
+ typedef internal::special_scalar_op_base > Base;
- typedef DenseCoeffsBase Base;
+ using Base::operator*;
using Base::derived;
using Base::const_cast_derived;
using Base::rows;
diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h
index a72738e..568493c 100644
--- a/Eigen/src/Core/DenseStorage.h
+++ b/Eigen/src/Core/DenseStorage.h
@@ -122,33 +122,41 @@ template class DenseSt
{
internal::plain_array m_data;
public:
- inline DenseStorage() {}
- inline DenseStorage(internal::constructor_without_unaligned_array_assert)
+ DenseStorage() {}
+ DenseStorage(internal::constructor_without_unaligned_array_assert)
: m_data(internal::constructor_without_unaligned_array_assert()) {}
- inline DenseStorage(DenseIndex,DenseIndex,DenseIndex) {}
- inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); }
- static inline DenseIndex rows(void) {return _Rows;}
- static inline DenseIndex cols(void) {return _Cols;}
- inline void conservativeResize(DenseIndex,DenseIndex,DenseIndex) {}
- inline void resize(DenseIndex,DenseIndex,DenseIndex) {}
- inline const T *data() const { return m_data.array; }
- inline T *data() { return m_data.array; }
+ DenseStorage(const DenseStorage& other) : m_data(other.m_data) {}
+ DenseStorage& operator=(const DenseStorage& other)
+ {
+ if (this != &other) m_data = other.m_data;
+ return *this;
+ }
+ DenseStorage(DenseIndex,DenseIndex,DenseIndex) {}
+ void swap(DenseStorage& other) { std::swap(m_data,other.m_data); }
+ static DenseIndex rows(void) {return _Rows;}
+ static DenseIndex cols(void) {return _Cols;}
+ void conservativeResize(DenseIndex,DenseIndex,DenseIndex) {}
+ void resize(DenseIndex,DenseIndex,DenseIndex) {}
+ const T *data() const { return m_data.array; }
+ T *data() { return m_data.array; }
};
// null matrix
template class DenseStorage
{
public:
- inline DenseStorage() {}
- inline DenseStorage(internal::constructor_without_unaligned_array_assert) {}
- inline DenseStorage(DenseIndex,DenseIndex,DenseIndex) {}
- inline void swap(DenseStorage& ) {}
- static inline DenseIndex rows(void) {return _Rows;}
- static inline DenseIndex cols(void) {return _Cols;}
- inline void conservativeResize(DenseIndex,DenseIndex,DenseIndex) {}
- inline void resize(DenseIndex,DenseIndex,DenseIndex) {}
- inline const T *data() const { return 0; }
- inline T *data() { return 0; }
+ DenseStorage() {}
+ DenseStorage(internal::constructor_without_unaligned_array_assert) {}
+ DenseStorage(const DenseStorage&) {}
+ DenseStorage& operator=(const DenseStorage&) { return *this; }
+ DenseStorage(DenseIndex,DenseIndex,DenseIndex) {}
+ void swap(DenseStorage& ) {}
+ static DenseIndex rows(void) {return _Rows;}
+ static DenseIndex cols(void) {return _Cols;}
+ void conservativeResize(DenseIndex,DenseIndex,DenseIndex) {}
+ void resize(DenseIndex,DenseIndex,DenseIndex) {}
+ const T *data() const { return 0; }
+ T *data() { return 0; }
};
// more specializations for null matrices; these are necessary to resolve ambiguities
@@ -168,18 +176,29 @@ template class DenseStorage class DenseStorage m_data;
DenseIndex m_rows;
public:
- inline DenseStorage() : m_rows(0) {}
- inline DenseStorage(internal::constructor_without_unaligned_array_assert)
+ DenseStorage() : m_rows(0) {}
+ DenseStorage(internal::constructor_without_unaligned_array_assert)
: m_data(internal::constructor_without_unaligned_array_assert()), m_rows(0) {}
- inline DenseStorage(DenseIndex, DenseIndex nbRows, DenseIndex) : m_rows(nbRows) {}
- inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); }
- inline DenseIndex rows(void) const {return m_rows;}
- inline DenseIndex cols(void) const {return _Cols;}
- inline void conservativeResize(DenseIndex, DenseIndex nbRows, DenseIndex) { m_rows = nbRows; }
- inline void resize(DenseIndex, DenseIndex nbRows, DenseIndex) { m_rows = nbRows; }
- inline const T *data() const { return m_data.array; }
- inline T *data() { return m_data.array; }
+ DenseStorage(const DenseStorage& other) : m_data(other.m_data), m_rows(other.m_rows) {}
+ DenseStorage& operator=(const DenseStorage& other)
+ {
+ if (this != &other)
+ {
+ m_data = other.m_data;
+ m_rows = other.m_rows;
+ }
+ return *this;
+ }
+ DenseStorage(DenseIndex, DenseIndex nbRows, DenseIndex) : m_rows(nbRows) {}
+ void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); }
+ DenseIndex rows(void) const {return m_rows;}
+ DenseIndex cols(void) const {return _Cols;}
+ void conservativeResize(DenseIndex, DenseIndex nbRows, DenseIndex) { m_rows = nbRows; }
+ void resize(DenseIndex, DenseIndex nbRows, DenseIndex) { m_rows = nbRows; }
+ const T *data() const { return m_data.array; }
+ T *data() { return m_data.array; }
};
// dynamic-size matrix with fixed-size storage and fixed height
@@ -207,17 +236,27 @@ template class DenseStorage m_data;
DenseIndex m_cols;
public:
- inline DenseStorage() : m_cols(0) {}
- inline DenseStorage(internal::constructor_without_unaligned_array_assert)
+ DenseStorage() : m_cols(0) {}
+ DenseStorage(internal::constructor_without_unaligned_array_assert)
: m_data(internal::constructor_without_unaligned_array_assert()), m_cols(0) {}
- inline DenseStorage(DenseIndex, DenseIndex, DenseIndex nbCols) : m_cols(nbCols) {}
- inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); }
- inline DenseIndex rows(void) const {return _Rows;}
- inline DenseIndex cols(void) const {return m_cols;}
- inline void conservativeResize(DenseIndex, DenseIndex, DenseIndex nbCols) { m_cols = nbCols; }
- inline void resize(DenseIndex, DenseIndex, DenseIndex nbCols) { m_cols = nbCols; }
- inline const T *data() const { return m_data.array; }
- inline T *data() { return m_data.array; }
+ DenseStorage(const DenseStorage& other) : m_data(other.m_data), m_cols(other.m_cols) {}
+ DenseStorage& operator=(const DenseStorage& other)
+ {
+ if (this != &other)
+ {
+ m_data = other.m_data;
+ m_cols = other.m_cols;
+ }
+ return *this;
+ }
+ DenseStorage(DenseIndex, DenseIndex, DenseIndex nbCols) : m_cols(nbCols) {}
+ void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); }
+ DenseIndex rows(void) const {return _Rows;}
+ DenseIndex cols(void) const {return m_cols;}
+ void conservativeResize(DenseIndex, DenseIndex, DenseIndex nbCols) { m_cols = nbCols; }
+ void resize(DenseIndex, DenseIndex, DenseIndex nbCols) { m_cols = nbCols; }
+ const T *data() const { return m_data.array; }
+ T *data() { return m_data.array; }
};
// purely dynamic matrix.
@@ -227,18 +266,35 @@ template class DenseStorage(size)), m_rows(nbRows), m_cols(nbCols)
{ EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN }
- inline ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, m_rows*m_cols); }
- inline void swap(DenseStorage& other)
+#ifdef EIGEN_HAVE_RVALUE_REFERENCES
+ DenseStorage(DenseStorage&& other)
+ : m_data(std::move(other.m_data))
+ , m_rows(std::move(other.m_rows))
+ , m_cols(std::move(other.m_cols))
+ {
+ other.m_data = nullptr;
+ }
+ DenseStorage& operator=(DenseStorage&& other)
+ {
+ using std::swap;
+ swap(m_data, other.m_data);
+ swap(m_rows, other.m_rows);
+ swap(m_cols, other.m_cols);
+ return *this;
+ }
+#endif
+ ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, m_rows*m_cols); }
+ void swap(DenseStorage& other)
{ std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); std::swap(m_cols,other.m_cols); }
- inline DenseIndex rows(void) const {return m_rows;}
- inline DenseIndex cols(void) const {return m_cols;}
- inline void conservativeResize(DenseIndex size, DenseIndex nbRows, DenseIndex nbCols)
+ DenseIndex rows(void) const {return m_rows;}
+ DenseIndex cols(void) const {return m_cols;}
+ void conservativeResize(DenseIndex size, DenseIndex nbRows, DenseIndex nbCols)
{
m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, m_rows*m_cols);
m_rows = nbRows;
@@ -258,8 +314,11 @@ template class DenseStorage class DenseStorage(size)), m_cols(nbCols)
+ DenseStorage() : m_data(0), m_cols(0) {}
+ DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {}
+ DenseStorage(DenseIndex size, DenseIndex, DenseIndex nbCols) : m_data(internal::conditional_aligned_new_auto(size)), m_cols(nbCols)
{ EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN }
- inline ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, _Rows*m_cols); }
- inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); }
- static inline DenseIndex rows(void) {return _Rows;}
- inline DenseIndex cols(void) const {return m_cols;}
- inline void conservativeResize(DenseIndex size, DenseIndex, DenseIndex nbCols)
+#ifdef EIGEN_HAVE_RVALUE_REFERENCES
+ DenseStorage(DenseStorage&& other)
+ : m_data(std::move(other.m_data))
+ , m_cols(std::move(other.m_cols))
+ {
+ other.m_data = nullptr;
+ }
+ DenseStorage& operator=(DenseStorage&& other)
+ {
+ using std::swap;
+ swap(m_data, other.m_data);
+ swap(m_cols, other.m_cols);
+ return *this;
+ }
+#endif
+ ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, _Rows*m_cols); }
+ void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); }
+ static DenseIndex rows(void) {return _Rows;}
+ DenseIndex cols(void) const {return m_cols;}
+ void conservativeResize(DenseIndex size, DenseIndex, DenseIndex nbCols)
{
m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, _Rows*m_cols);
m_cols = nbCols;
@@ -294,8 +368,11 @@ template class DenseStorage class DenseStorage(size)), m_rows(nbRows)
+ DenseStorage() : m_data(0), m_rows(0) {}
+ DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {}
+ DenseStorage(DenseIndex size, DenseIndex nbRows, DenseIndex) : m_data(internal::conditional_aligned_new_auto(size)), m_rows(nbRows)
{ EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN }
- inline ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, _Cols*m_rows); }
- inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); }
- inline DenseIndex rows(void) const {return m_rows;}
- static inline DenseIndex cols(void) {return _Cols;}
- inline void conservativeResize(DenseIndex size, DenseIndex nbRows, DenseIndex)
+#ifdef EIGEN_HAVE_RVALUE_REFERENCES
+ DenseStorage(DenseStorage&& other)
+ : m_data(std::move(other.m_data))
+ , m_rows(std::move(other.m_rows))
+ {
+ other.m_data = nullptr;
+ }
+ DenseStorage& operator=(DenseStorage&& other)
+ {
+ using std::swap;
+ swap(m_data, other.m_data);
+ swap(m_rows, other.m_rows);
+ return *this;
+ }
+#endif
+ ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, _Cols*m_rows); }
+ void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); }
+ DenseIndex rows(void) const {return m_rows;}
+ static DenseIndex cols(void) {return _Cols;}
+ void conservativeResize(DenseIndex size, DenseIndex nbRows, DenseIndex)
{
m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, m_rows*_Cols);
m_rows = nbRows;
@@ -330,8 +422,11 @@ template class DenseStorage
template
void evalTo(MatrixBase &other) const;
template
- void addTo(MatrixBase &other) const
+ inline void addTo(MatrixBase &other) const
{ other.diagonal() += diagonal(); }
template
- void subTo(MatrixBase &other) const
+ inline void subTo(MatrixBase &other) const
{ other.diagonal() -= diagonal(); }
inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); }
@@ -98,7 +98,7 @@ class DiagonalBase : public EigenBase
template
template
-void DiagonalBase::evalTo(MatrixBase &other) const
+inline void DiagonalBase::evalTo(MatrixBase &other) const
{
other.setZero();
other.diagonal() = diagonal();
diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h
index 00f8f29..cc6b536 100644
--- a/Eigen/src/Core/DiagonalProduct.h
+++ b/Eigen/src/Core/DiagonalProduct.h
@@ -35,7 +35,8 @@ struct traits >
_LinearAccessMask = (RowsAtCompileTime==1 || ColsAtCompileTime==1) ? LinearAccessBit : 0,
Flags = ((HereditaryBits|_LinearAccessMask|AlignedBit) & (unsigned int)(MatrixType::Flags)) | (_Vectorizable ? PacketAccessBit : 0),//(int(MatrixType::Flags)&int(DiagonalType::DiagonalVectorType::Flags)&AlignedBit),
- CoeffReadCost = NumTraits::MulCost + MatrixType::CoeffReadCost + DiagonalType::DiagonalVectorType::CoeffReadCost
+ Cost0 = EIGEN_ADD_COST(NumTraits::MulCost, MatrixType::CoeffReadCost),
+ CoeffReadCost = EIGEN_ADD_COST(Cost0,DiagonalType::DiagonalVectorType::CoeffReadCost)
};
};
}
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h
index 9d7651f..23aab83 100644
--- a/Eigen/src/Core/Dot.h
+++ b/Eigen/src/Core/Dot.h
@@ -59,7 +59,7 @@ struct dot_nocheck
*/
template
template
-typename internal::scalar_product_traits::Scalar,typename internal::traits::Scalar>::ReturnType
+inline typename internal::scalar_product_traits::Scalar,typename internal::traits::Scalar>::ReturnType
MatrixBase::dot(const MatrixBase& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h
index 0eae529..5744eb7 100644
--- a/Eigen/src/Core/GeneralProduct.h
+++ b/Eigen/src/Core/GeneralProduct.h
@@ -205,9 +205,6 @@ class GeneralProduct
public:
GeneralProduct(const Lhs& lhs, const Rhs& rhs)
{
- EIGEN_STATIC_ASSERT((internal::is_same::value),
- YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
-
Base::coeffRef(0,0) = (lhs.transpose().cwiseProduct(rhs)).sum();
}
@@ -264,8 +261,6 @@ class GeneralProduct
GeneralProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs)
{
- EIGEN_STATIC_ASSERT((internal::is_same::value),
- YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
}
struct set { template void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() = src; } };
@@ -425,15 +420,18 @@ template<> struct gemv_selector
ResScalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs())
* RhsBlasTraits::extractScalarFactor(prod.rhs());
+ // make sure Dest is a compile-time vector type (bug 1166)
+ typedef typename conditional::type ActualDest;
+
enum {
// FIXME find a way to allow an inner stride on the result if packet_traits::size==1
// on, the other hand it is good for the cache to pack the vector anyways...
- EvalToDestAtCompileTime = Dest::InnerStrideAtCompileTime==1,
+ EvalToDestAtCompileTime = (ActualDest::InnerStrideAtCompileTime==1),
ComplexByReal = (NumTraits::IsComplex) && (!NumTraits::IsComplex),
- MightCannotUseDest = (Dest::InnerStrideAtCompileTime!=1) || ComplexByReal
+ MightCannotUseDest = (ActualDest::InnerStrideAtCompileTime!=1) || ComplexByReal
};
- gemv_static_vector_if static_dest;
+ gemv_static_vector_if static_dest;
bool alphaIsCompatible = (!ComplexByReal) || (numext::imag(actualAlpha)==RealScalar(0));
bool evalToDest = EvalToDestAtCompileTime && alphaIsCompatible;
@@ -522,7 +520,7 @@ template<> struct gemv_selector
actualLhs.rows(), actualLhs.cols(),
actualLhs.data(), actualLhs.outerStride(),
actualRhsPtr, 1,
- dest.data(), dest.innerStride(),
+ dest.data(), dest.col(0).innerStride(), //NOTE if dest is not a vector at compile-time, then dest.innerStride() might be wrong. (bug 1166)
actualAlpha);
}
};
diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h
index a9828f7..81efc4a 100644
--- a/Eigen/src/Core/MapBase.h
+++ b/Eigen/src/Core/MapBase.h
@@ -149,6 +149,10 @@ template class MapBase
checkSanity();
}
+ #ifdef EIGEN_MAPBASE_PLUGIN
+ #include EIGEN_MAPBASE_PLUGIN
+ #endif
+
protected:
void checkSanity() const
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h
index adf2f9c..dc2c698 100644
--- a/Eigen/src/Core/MathFunctions.h
+++ b/Eigen/src/Core/MathFunctions.h
@@ -218,8 +218,8 @@ struct conj_retval
* Implementation of abs2 *
****************************************************************************/
-template
-struct abs2_impl
+template
+struct abs2_impl_default
{
typedef typename NumTraits::Real RealScalar;
static inline RealScalar run(const Scalar& x)
@@ -228,15 +228,26 @@ struct abs2_impl
}
};
-template
-struct abs2_impl >
+template
+struct abs2_impl_default // IsComplex
{
- static inline RealScalar run(const std::complex& x)
+ typedef typename NumTraits::Real RealScalar;
+ static inline RealScalar run(const Scalar& x)
{
return real(x)*real(x) + imag(x)*imag(x);
}
};
+template
+struct abs2_impl
+{
+ typedef typename NumTraits::Real RealScalar;
+ static inline RealScalar run(const Scalar& x)
+ {
+ return abs2_impl_default::IsComplex>::run(x);
+ }
+};
+
template
struct abs2_retval
{
@@ -707,21 +718,21 @@ struct scalar_fuzzy_impl : scalar_fuzzy_default_impl::
template
inline bool isMuchSmallerThan(const Scalar& x, const OtherScalar& y,
- typename NumTraits::Real precision = NumTraits::dummy_precision())
+ const typename NumTraits::Real &precision = NumTraits::dummy_precision())
{
return scalar_fuzzy_impl::template isMuchSmallerThan(x, y, precision);
}
template
inline bool isApprox(const Scalar& x, const Scalar& y,
- typename NumTraits::Real precision = NumTraits::dummy_precision())
+ const typename NumTraits::Real &precision = NumTraits::dummy_precision())
{
return scalar_fuzzy_impl::isApprox(x, y, precision);
}
template
inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y,
- typename NumTraits::Real precision = NumTraits::dummy_precision())
+ const typename NumTraits::Real &precision = NumTraits::dummy_precision())
{
return scalar_fuzzy_impl::isApproxOrLessThan(x, y, precision);
}
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h
index d7d0b5b..02be142 100644
--- a/Eigen/src/Core/Matrix.h
+++ b/Eigen/src/Core/Matrix.h
@@ -211,6 +211,21 @@ class Matrix
: Base(internal::constructor_without_unaligned_array_assert())
{ Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }
+#ifdef EIGEN_HAVE_RVALUE_REFERENCES
+ Matrix(Matrix&& other)
+ : Base(std::move(other))
+ {
+ Base::_check_template_params();
+ if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic)
+ Base::_set_noalias(other);
+ }
+ Matrix& operator=(Matrix&& other)
+ {
+ other.swap(*this);
+ return *this;
+ }
+#endif
+
/** \brief Constructs a vector or row-vector with given dimension. \only_for_vectors
*
* Note that this is only useful for dynamic-size vectors. For fixed-size vectors,
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index b67a7c1..e83ef4d 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -440,6 +440,15 @@ template class MatrixBase
template
void applyOnTheRight(Index p, Index q, const JacobiRotation& j);
+///////// SparseCore module /////////
+
+ template
+ EIGEN_STRONG_INLINE const typename SparseMatrixBase::template CwiseProductDenseReturnType::Type
+ cwiseProduct(const SparseMatrixBase &other) const
+ {
+ return other.cwiseProduct(derived());
+ }
+
///////// MatrixFunctions module /////////
typedef typename internal::stem_function::type StemFunction;
diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h
index 85ffae2..bda79fa 100644
--- a/Eigen/src/Core/PermutationMatrix.h
+++ b/Eigen/src/Core/PermutationMatrix.h
@@ -584,10 +584,11 @@ struct permut_matrix_product_retval
const Index n = Side==OnTheLeft ? rows() : cols();
// FIXME we need an is_same for expression that is not sensitive to constness. For instance
// is_same_xpr, Block >::value should be true.
+ const typename Dest::Scalar *dst_data = internal::extract_data(dst);
if( is_same::value
&& blas_traits::HasUsableDirectAccess
&& blas_traits::HasUsableDirectAccess
- && extract_data(dst) == extract_data(m_matrix))
+ && dst_data!=0 && dst_data == extract_data(m_matrix))
{
// apply the permutation inplace
Matrix mask(m_permutation.size());
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h
index ffd3a06..9f71956 100644
--- a/Eigen/src/Core/PlainObjectBase.h
+++ b/Eigen/src/Core/PlainObjectBase.h
@@ -315,8 +315,8 @@ class PlainObjectBase : public internal::dense_xpr_base::type
EIGEN_STRONG_INLINE void resizeLike(const EigenBase& _other)
{
const OtherDerived& other = _other.derived();
- internal::check_rows_cols_for_overflow::run(other.rows(), other.cols());
- const Index othersize = other.rows()*other.cols();
+ internal::check_rows_cols_for_overflow::run(Index(other.rows()), Index(other.cols()));
+ const Index othersize = Index(other.rows())*Index(other.cols());
if(RowsAtCompileTime == 1)
{
eigen_assert(other.rows() == 1 || other.cols() == 1);
@@ -437,6 +437,20 @@ class PlainObjectBase : public internal::dense_xpr_base::type
}
#endif
+#ifdef EIGEN_HAVE_RVALUE_REFERENCES
+ PlainObjectBase(PlainObjectBase&& other)
+ : m_storage( std::move(other.m_storage) )
+ {
+ }
+
+ PlainObjectBase& operator=(PlainObjectBase&& other)
+ {
+ using std::swap;
+ swap(m_storage, other.m_storage);
+ return *this;
+ }
+#endif
+
/** Copy constructor */
EIGEN_STRONG_INLINE PlainObjectBase(const PlainObjectBase& other)
: m_storage()
@@ -473,7 +487,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type
/** \sa MatrixBase::operator=(const EigenBase&) */
template
EIGEN_STRONG_INLINE PlainObjectBase(const EigenBase &other)
- : m_storage(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
+ : m_storage(Index(other.derived().rows()) * Index(other.derived().cols()), other.derived().rows(), other.derived().cols())
{
_check_template_params();
internal::check_rows_cols_for_overflow::run(other.derived().rows(), other.derived().cols());
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index 50548fa..9b8662a 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -247,8 +247,9 @@ struct redux_impl
}
};
-template
-struct redux_impl
+// NOTE: for SliceVectorizedTraversal we simply bypass unrolling
+template
+struct redux_impl
{
typedef typename Derived::Scalar Scalar;
typedef typename packet_traits::type PacketScalar;
diff --git a/Eigen/src/Core/SelfCwiseBinaryOp.h b/Eigen/src/Core/SelfCwiseBinaryOp.h
index 22f3047..0956475 100644
--- a/Eigen/src/Core/SelfCwiseBinaryOp.h
+++ b/Eigen/src/Core/SelfCwiseBinaryOp.h
@@ -180,15 +180,9 @@ inline Derived& DenseBase::operator*=(const Scalar& other)
template
inline Derived& DenseBase::operator/=(const Scalar& other)
{
- typedef typename internal::conditional::IsInteger,
- internal::scalar_quotient_op,
- internal::scalar_product_op >::type BinOp;
typedef typename Derived::PlainObject PlainObject;
- SelfCwiseBinaryOp tmp(derived());
- Scalar actual_other;
- if(NumTraits::IsInteger) actual_other = other;
- else actual_other = Scalar(1)/other;
- tmp = PlainObject::Constant(rows(),cols(), actual_other);
+ SelfCwiseBinaryOp, Derived, typename PlainObject::ConstantReturnType> tmp(derived());
+ tmp = PlainObject::Constant(rows(),cols(), other);
return derived();
}
diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h
index ef17f28..30c9c38 100644
--- a/Eigen/src/Core/SolveTriangular.h
+++ b/Eigen/src/Core/SolveTriangular.h
@@ -116,17 +116,17 @@ template
struct triangular_solver_unroller {
enum {
IsLower = ((Mode&Lower)==Lower),
- I = IsLower ? Index : Size - Index - 1,
- S = IsLower ? 0 : I+1
+ RowIndex = IsLower ? Index : Size - Index - 1,
+ S = IsLower ? 0 : RowIndex+1
};
static void run(const Lhs& lhs, Rhs& rhs)
{
if (Index>0)
- rhs.coeffRef(I) -= lhs.row(I).template segment(S).transpose()
+ rhs.coeffRef(RowIndex) -= lhs.row(RowIndex).template segment(S).transpose()
.cwiseProduct(rhs.template segment(S)).sum();
if(!(Mode & UnitDiag))
- rhs.coeffRef(I) /= lhs.coeff(I,I);
+ rhs.coeffRef(RowIndex) /= lhs.coeff(RowIndex,RowIndex);
triangular_solver_unroller::run(lhs,rhs);
}
@@ -243,7 +243,8 @@ template struct triangular_solv
template inline void evalTo(Dest& dst) const
{
- if(!(is_same::value && extract_data(dst) == extract_data(m_rhs)))
+ const typename Dest::Scalar *dst_data = internal::extract_data(dst);
+ if(!(is_same::value && dst_data!=0 && extract_data(dst) == extract_data(m_rhs)))
dst = m_rhs;
m_triangularMatrix.template solveInPlace(dst);
}
diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h
index 22096ea..2abce3c 100644
--- a/Eigen/src/Core/Transpose.h
+++ b/Eigen/src/Core/Transpose.h
@@ -331,11 +331,11 @@ inline void MatrixBase::adjointInPlace()
namespace internal {
-template
-struct blas_traits >
- : blas_traits
+template
+struct blas_traits >
+ : blas_traits::type>
{
- typedef SelfCwiseBinaryOp XprType;
+ typedef SelfCwiseBinaryOp XprType;
static inline const XprType extract(const XprType& x) { return x; }
};
@@ -392,7 +392,6 @@ struct checkTransposeAliasing_impl
::run(extract_data(dst), other))
&& "aliasing detected during transposition, use transposeInPlace() "
"or evaluate the rhs into a temporary using .eval()");
-
}
};
diff --git a/Eigen/src/Core/Transpositions.h b/Eigen/src/Core/Transpositions.h
index e4ba075..16bc1ce 100644
--- a/Eigen/src/Core/Transpositions.h
+++ b/Eigen/src/Core/Transpositions.h
@@ -376,7 +376,8 @@ struct transposition_matrix_product_retval
const int size = m_transpositions.size();
Index j = 0;
- if(!(is_same::value && extract_data(dst) == extract_data(m_matrix)))
+ const typename Dest::Scalar *dst_data = internal::extract_data(dst);
+ if(!(is_same::value && dst_data!=0 && dst_data == extract_data(m_matrix)))
dst = m_matrix;
for(int k=(Transposed?size-1:0) ; Transposed?k>=0:k
template
void DenseBase::visit(Visitor& visitor) const
{
+ typedef typename internal::remove_all::type ThisNested;
+ typename Derived::Nested thisNested(derived());
+
enum { unroll = SizeAtCompileTime != Dynamic
&& CoeffReadCost != Dynamic
&& (SizeAtCompileTime == 1 || internal::functor_traits::Cost != Dynamic)
&& SizeAtCompileTime * CoeffReadCost + (SizeAtCompileTime-1) * internal::functor_traits::Cost
<= EIGEN_UNROLLING_LIMIT };
- return internal::visitor_impl::run(derived(), visitor);
+ >::run(thisNested, visitor);
}
namespace internal {
diff --git a/Eigen/src/Core/arch/SSE/MathFunctions.h b/Eigen/src/Core/arch/SSE/MathFunctions.h
index d16f30b..2b07168 100644
--- a/Eigen/src/Core/arch/SSE/MathFunctions.h
+++ b/Eigen/src/Core/arch/SSE/MathFunctions.h
@@ -126,7 +126,7 @@ Packet4f pexp(const Packet4f& _x)
_EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459E-1f);
_EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201E-1f);
- Packet4f tmp = _mm_setzero_ps(), fx;
+ Packet4f tmp, fx;
Packet4i emm0;
// clamp x
@@ -195,7 +195,7 @@ Packet2d pexp(const Packet2d& _x)
_EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6);
static const __m128i p4i_1023_0 = _mm_setr_epi32(1023, 1023, 0, 0);
- Packet2d tmp = _mm_setzero_pd(), fx;
+ Packet2d tmp, fx;
Packet4i emm0;
// clamp x
@@ -279,7 +279,7 @@ Packet4f psin(const Packet4f& _x)
_EIGEN_DECLARE_CONST_Packet4f(coscof_p2, 4.166664568298827E-002f);
_EIGEN_DECLARE_CONST_Packet4f(cephes_FOPI, 1.27323954473516f); // 4 / M_PI
- Packet4f xmm1, xmm2 = _mm_setzero_ps(), xmm3, sign_bit, y;
+ Packet4f xmm1, xmm2, xmm3, sign_bit, y;
Packet4i emm0, emm2;
sign_bit = x;
@@ -378,7 +378,7 @@ Packet4f pcos(const Packet4f& _x)
_EIGEN_DECLARE_CONST_Packet4f(coscof_p2, 4.166664568298827E-002f);
_EIGEN_DECLARE_CONST_Packet4f(cephes_FOPI, 1.27323954473516f); // 4 / M_PI
- Packet4f xmm1, xmm2 = _mm_setzero_ps(), xmm3, y;
+ Packet4f xmm1, xmm2, xmm3, y;
Packet4i emm0, emm2;
x = pabs(x);
diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h
index fc8ae50..bef898b 100644
--- a/Eigen/src/Core/arch/SSE/PacketMath.h
+++ b/Eigen/src/Core/arch/SSE/PacketMath.h
@@ -235,63 +235,27 @@ template<> EIGEN_STRONG_INLINE Packet4i pload(const int* from) { E
return _mm_loadu_ps(from);
#endif
}
- template<> EIGEN_STRONG_INLINE Packet2d ploadu(const double* from) { EIGEN_DEBUG_UNALIGNED_LOAD return _mm_loadu_pd(from); }
- template<> EIGEN_STRONG_INLINE Packet4i ploadu(const int* from) { EIGEN_DEBUG_UNALIGNED_LOAD return _mm_loadu_si128(reinterpret_cast(from)); }
#else
-// Fast unaligned loads. Note that here we cannot directly use intrinsics: this would
-// require pointer casting to incompatible pointer types and leads to invalid code
-// because of the strict aliasing rule. The "dummy" stuff are required to enforce
-// a correct instruction dependency.
-// TODO: do the same for MSVC (ICC is compatible)
// NOTE: with the code below, MSVC's compiler crashes!
-#if defined(__GNUC__) && defined(__i386__)
- // bug 195: gcc/i386 emits weird x87 fldl/fstpl instructions for _mm_load_sd
- #define EIGEN_AVOID_CUSTOM_UNALIGNED_LOADS 1
-#elif defined(__clang__)
- // bug 201: Segfaults in __mm_loadh_pd with clang 2.8
- #define EIGEN_AVOID_CUSTOM_UNALIGNED_LOADS 1
-#else
- #define EIGEN_AVOID_CUSTOM_UNALIGNED_LOADS 0
-#endif
-
template<> EIGEN_STRONG_INLINE Packet4f ploadu(const float* from)
{
EIGEN_DEBUG_UNALIGNED_LOAD
-#if EIGEN_AVOID_CUSTOM_UNALIGNED_LOADS
return _mm_loadu_ps(from);
-#else
- __m128d res;
- res = _mm_load_sd((const double*)(from)) ;
- res = _mm_loadh_pd(res, (const double*)(from+2)) ;
- return _mm_castpd_ps(res);
-#endif
}
+#endif
+
template<> EIGEN_STRONG_INLINE Packet2d ploadu(const double* from)
{
EIGEN_DEBUG_UNALIGNED_LOAD
-#if EIGEN_AVOID_CUSTOM_UNALIGNED_LOADS
return _mm_loadu_pd(from);
-#else
- __m128d res;
- res = _mm_load_sd(from) ;
- res = _mm_loadh_pd(res,from+1);
- return res;
-#endif
}
template<> EIGEN_STRONG_INLINE Packet4i ploadu(const int* from)
{
EIGEN_DEBUG_UNALIGNED_LOAD
-#if EIGEN_AVOID_CUSTOM_UNALIGNED_LOADS
- return _mm_loadu_si128(reinterpret_cast(from));
-#else
- __m128d res;
- res = _mm_load_sd((const double*)(from)) ;
- res = _mm_loadh_pd(res, (const double*)(from+2)) ;
- return _mm_castpd_si128(res);
-#endif
+ return _mm_loadu_si128(reinterpret_cast(from));
}
-#endif
+
template<> EIGEN_STRONG_INLINE Packet4f ploaddup(const float* from)
{
diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h
index 3f5ffcf..cfd2f00 100644
--- a/Eigen/src/Core/products/GeneralMatrixMatrix.h
+++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h
@@ -140,8 +140,10 @@ static void run(Index rows, Index cols, Index depth,
// Release all the sub blocks B'_j of B' for the current thread,
// i.e., we simply decrement the number of users by 1
for(Index j=0; j
GeneralProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs)
{
+#if !(defined(EIGEN_NO_STATIC_ASSERT) && defined(EIGEN_NO_DEBUG))
typedef internal::scalar_product_op BinOp;
EIGEN_CHECK_BINARY_COMPATIBILIY(BinOp,LhsScalar,RhsScalar);
+#endif
}
template void scaleAndAddTo(Dest& dst, const Scalar& alpha) const
{
eigen_assert(dst.rows()==m_lhs.rows() && dst.cols()==m_rhs.cols());
+ if(m_lhs.cols()==0 || m_lhs.rows()==0 || m_rhs.cols()==0)
+ return;
typename internal::add_const_on_value_type::type lhs = LhsBlasTraits::extract(m_lhs);
typename internal::add_const_on_value_type::type rhs = RhsBlasTraits::extract(m_rhs);
diff --git a/Eigen/src/Core/products/TriangularSolverMatrix.h b/Eigen/src/Core/products/TriangularSolverMatrix.h
index f103eae..3984b80 100644
--- a/Eigen/src/Core/products/TriangularSolverMatrix.h
+++ b/Eigen/src/Core/products/TriangularSolverMatrix.h
@@ -81,7 +81,7 @@ EIGEN_DONT_INLINE void triangular_solve_matrix0 ? l2/(4 * sizeof(Scalar) * otherStride) : 0;
+ Index subcols = cols>0 ? l2/(4 * sizeof(Scalar) * std::max(otherStride,size)) : 0;
subcols = std::max((subcols/Traits::nr)*Traits::nr, Traits::nr);
for(Index k2=IsLower ? 0 : size;
@@ -115,8 +115,9 @@ EIGEN_DONT_INLINE void triangular_solve_matrix struct blas_traits
};
// pop conjugate
-template
-struct blas_traits, NestedXpr> >
- : blas_traits
+template
+struct blas_traits, Xpr> >
+ : blas_traits::type>
{
+ typedef typename internal::remove_all::type NestedXpr;
typedef blas_traits Base;
- typedef CwiseUnaryOp, NestedXpr> XprType;
+ typedef CwiseUnaryOp, Xpr> XprType;
typedef typename Base::ExtractType ExtractType;
enum {
@@ -188,12 +189,13 @@ struct blas_traits, NestedXpr> >
};
// pop scalar multiple
-template
-struct blas_traits, NestedXpr> >
- : blas_traits
+template
+struct blas_traits, Xpr> >
+ : blas_traits::type>
{
+ typedef typename internal::remove_all