mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
fix ei_blas_traits directaccess check: in the case of vectors, having a nontrivial inner stride is OK.
This commit is contained in:
parent
04c663840b
commit
d9ee28851e
@ -158,8 +158,8 @@ template<typename XprType> struct ei_blas_traits
|
||||
IsComplex = NumTraits<Scalar>::IsComplex,
|
||||
IsTransposed = false,
|
||||
NeedToConjugate = false,
|
||||
ActualAccess = ( (int(ei_traits<XprType>::Flags)&DirectAccessBit)
|
||||
&& (int(ei_inner_stride_at_compile_time<XprType>::ret) == 1)
|
||||
ActualAccess = ( (int(XprType::Flags)&DirectAccessBit)
|
||||
&& (bool(XprType::IsVectorAtCompileTime) || int(ei_inner_stride_at_compile_time<XprType>::ret) == 1)
|
||||
) ? HasDirectAccess : NoDirectAccess
|
||||
};
|
||||
typedef typename ei_meta_if<int(ActualAccess)==HasDirectAccess,
|
||||
|
@ -86,8 +86,7 @@ template<typename MatrixType> void product_notemporary(const MatrixType& m)
|
||||
VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).template triangularView<Upper>() * (m2+m2), 1);
|
||||
VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).template triangularView<UnitUpper>() * m2.adjoint(), 0);
|
||||
|
||||
// FIXME this used to work but was broken by the eigen-storageorders fork. Why?
|
||||
// VERIFY_EVALUATION_COUNT( rm3.col(c0).noalias() = (s1 * m1.adjoint()).template triangularView<UnitUpper>() * (s2*m2.row(c0)).adjoint(), 0);
|
||||
VERIFY_EVALUATION_COUNT( rm3.col(c0).noalias() = (s1 * m1.adjoint()).template triangularView<UnitUpper>() * (s2*m2.row(c0)).adjoint(), 0);
|
||||
|
||||
VERIFY_EVALUATION_COUNT( m1.template triangularView<Lower>().solveInPlace(m3), 0);
|
||||
VERIFY_EVALUATION_COUNT( m1.adjoint().template triangularView<Lower>().solveInPlace(m3.transpose()), 0);
|
||||
@ -96,10 +95,8 @@ template<typename MatrixType> void product_notemporary(const MatrixType& m)
|
||||
VERIFY_EVALUATION_COUNT( m3.noalias() = s2 * m2.adjoint() * (s1 * m1.adjoint()).template selfadjointView<Upper>(), 0);
|
||||
VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).template selfadjointView<Lower>() * m2.adjoint(), 0);
|
||||
|
||||
// FIXME this used to work but was broken by the eigen-storageorders fork. Why?
|
||||
// VERIFY_EVALUATION_COUNT( m3.col(c0).noalias() = (s1 * m1).adjoint().template selfadjointView<Lower>() * (-m2.row(c0)*s3).adjoint(), 0);
|
||||
// FIXME this used to work but was broken by the eigen-storageorders fork. Why?
|
||||
// VERIFY_EVALUATION_COUNT( m3.col(c0).noalias() -= (s1 * m1).adjoint().template selfadjointView<Upper>() * (-m2.row(c0)*s3).adjoint(), 0);
|
||||
VERIFY_EVALUATION_COUNT( m3.col(c0).noalias() = (s1 * m1).adjoint().template selfadjointView<Lower>() * (-m2.row(c0)*s3).adjoint(), 0);
|
||||
VERIFY_EVALUATION_COUNT( m3.col(c0).noalias() -= (s1 * m1).adjoint().template selfadjointView<Upper>() * (-m2.row(c0)*s3).adjoint(), 0);
|
||||
|
||||
VERIFY_EVALUATION_COUNT( m3.block(r0,c0,r1,c1).noalias() += m1.block(r0,r0,r1,r1).template selfadjointView<Upper>() * (s1*m2.block(r0,c0,r1,c1)), 0);
|
||||
VERIFY_EVALUATION_COUNT( m3.block(r0,c0,r1,c1).noalias() = m1.block(r0,r0,r1,r1).template selfadjointView<Upper>() * m2.block(r0,c0,r1,c1), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user