mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
Fix numerous nested versus nested_eval shortcomings
This commit is contained in:
parent
fc13b37c55
commit
2a3c3c49a1
@ -211,8 +211,13 @@ template<typename OtherDerived>
|
|||||||
bool MatrixBase<Derived>::isOrthogonal
|
bool MatrixBase<Derived>::isOrthogonal
|
||||||
(const MatrixBase<OtherDerived>& other, const RealScalar& prec) const
|
(const MatrixBase<OtherDerived>& other, const RealScalar& prec) const
|
||||||
{
|
{
|
||||||
|
#ifndef EIGEN_TEST_EVALUATORS
|
||||||
typename internal::nested<Derived,2>::type nested(derived());
|
typename internal::nested<Derived,2>::type nested(derived());
|
||||||
typename internal::nested<OtherDerived,2>::type otherNested(other.derived());
|
typename internal::nested<OtherDerived,2>::type otherNested(other.derived());
|
||||||
|
#else
|
||||||
|
typename internal::nested_eval<Derived,2>::type nested(derived());
|
||||||
|
typename internal::nested_eval<OtherDerived,2>::type otherNested(other.derived());
|
||||||
|
#endif
|
||||||
return numext::abs2(nested.dot(otherNested)) <= prec * prec * nested.squaredNorm() * otherNested.squaredNorm();
|
return numext::abs2(nested.dot(otherNested)) <= prec * prec * nested.squaredNorm() * otherNested.squaredNorm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,11 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
|||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
inline explicit AlignedBox(const MatrixBase<Derived>& a_p)
|
inline explicit AlignedBox(const MatrixBase<Derived>& a_p)
|
||||||
{
|
{
|
||||||
|
#ifndef EIGEN_TEST_EVALUATORS
|
||||||
typename internal::nested<Derived,2>::type p(a_p.derived());
|
typename internal::nested<Derived,2>::type p(a_p.derived());
|
||||||
|
#else
|
||||||
|
typename internal::nested_eval<Derived,2>::type p(a_p.derived());
|
||||||
|
#endif
|
||||||
m_min = p;
|
m_min = p;
|
||||||
m_max = p;
|
m_max = p;
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,11 @@ inline void MatrixBase<Derived>::computeInverseAndDetWithCheck(
|
|||||||
// for larger sizes, evaluating has negligible cost and limits code size.
|
// for larger sizes, evaluating has negligible cost and limits code size.
|
||||||
typedef typename internal::conditional<
|
typedef typename internal::conditional<
|
||||||
RowsAtCompileTime == 2,
|
RowsAtCompileTime == 2,
|
||||||
|
#ifndef EIGEN_TEST_EVALUATORS
|
||||||
typename internal::remove_all<typename internal::nested<Derived, 2>::type>::type,
|
typename internal::remove_all<typename internal::nested<Derived, 2>::type>::type,
|
||||||
|
#else
|
||||||
|
typename internal::remove_all<typename internal::nested_eval<Derived, 2>::type>::type,
|
||||||
|
#endif
|
||||||
PlainObject
|
PlainObject
|
||||||
>::type MatrixType;
|
>::type MatrixType;
|
||||||
internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run
|
internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run
|
||||||
|
@ -251,8 +251,6 @@ ei_add_test(dense_storage)
|
|||||||
|
|
||||||
# # ei_add_test(denseLM)
|
# # ei_add_test(denseLM)
|
||||||
|
|
||||||
if(NOT EIGEN_TEST_EVALUATORS)
|
|
||||||
|
|
||||||
if(QT4_FOUND)
|
if(QT4_FOUND)
|
||||||
ei_add_test(qtvector "" "${QT_QTCORE_LIBRARY}")
|
ei_add_test(qtvector "" "${QT_QTCORE_LIBRARY}")
|
||||||
endif(QT4_FOUND)
|
endif(QT4_FOUND)
|
||||||
@ -285,8 +283,6 @@ if(METIS_FOUND)
|
|||||||
ei_add_test(metis_support "" "${METIS_LIBRARIES}")
|
ei_add_test(metis_support "" "${METIS_LIBRARIES}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif(NOT EIGEN_TEST_EVALUATORS)
|
|
||||||
|
|
||||||
string(TOLOWER "${CMAKE_CXX_COMPILER}" cmake_cxx_compiler_tolower)
|
string(TOLOWER "${CMAKE_CXX_COMPILER}" cmake_cxx_compiler_tolower)
|
||||||
if(cmake_cxx_compiler_tolower MATCHES "qcc")
|
if(cmake_cxx_compiler_tolower MATCHES "qcc")
|
||||||
set(CXX_IS_QCC "ON")
|
set(CXX_IS_QCC "ON")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user