mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
some compilation fixes
This commit is contained in:
parent
7caf751fdd
commit
9facdaf7b9
@ -95,7 +95,7 @@ struct ei_product_triangular_vector_selector<Lhs,Rhs,Result,Mode,ConjLhs,ConjRhs
|
||||
int s = IsLowerTriangular ? pi : (HasUnitDiag ? i+1 : i);
|
||||
int r = IsLowerTriangular ? k+1 : actualPanelWidth-k;
|
||||
if ((!HasUnitDiag) || (--r)>0)
|
||||
res.coeffRef(i) += alpha * (cjLhs.row(i).segment(s,r).cwise() * cjRhs.segment(s,r).transpose()).sum();
|
||||
res.coeffRef(i) += alpha * (cjLhs.row(i).segment(s,r).cwiseProduct(cjRhs.segment(s,r).transpose())).sum();
|
||||
if (HasUnitDiag)
|
||||
res.coeffRef(i) += alpha * cjRhs.coeff(i);
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
|
||||
|
||||
VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2);
|
||||
VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));
|
||||
VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.cwise() * m1);
|
||||
VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.array()*m1);
|
||||
if (MatrixType::RowsAtCompileTime<EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD) {
|
||||
// If the matrices are too large, we have better to use the optimized GEMM
|
||||
// routines which allocates temporaries. However, on some platforms
|
||||
|
@ -15,7 +15,7 @@
|
||||
//
|
||||
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
|
||||
// FOR A PARTICULAR PURPOSE.f See the GNU Lesser General Public License or the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
@ -29,8 +29,8 @@
|
||||
template<typename Derived1, typename Derived2>
|
||||
bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = precision<typename Derived1::RealScalar>())
|
||||
{
|
||||
return !((m1-m2).cwise().abs2().maxCoeff() < epsilon * epsilon
|
||||
* std::max(m1.cwise().abs2().maxCoeff(), m2.cwise().abs2().maxCoeff()));
|
||||
return !((m1-m2).cwiseAbs2().maxCoeff() < epsilon * epsilon
|
||||
* std::max(m1.cwiseAbs2().maxCoeff(), m2.cwiseAbs2().maxCoeff()));
|
||||
}
|
||||
|
||||
template<typename MatrixType> void product(const MatrixType& m)
|
||||
|
Loading…
Reference in New Issue
Block a user