mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 09:39:34 +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 s = IsLowerTriangular ? pi : (HasUnitDiag ? i+1 : i);
|
||||||
int r = IsLowerTriangular ? k+1 : actualPanelWidth-k;
|
int r = IsLowerTriangular ? k+1 : actualPanelWidth-k;
|
||||||
if ((!HasUnitDiag) || (--r)>0)
|
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)
|
if (HasUnitDiag)
|
||||||
res.coeffRef(i) += alpha * cjRhs.coeff(i);
|
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)*s1, s1*m1+s1*m2);
|
||||||
VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));
|
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 (MatrixType::RowsAtCompileTime<EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD) {
|
||||||
// If the matrices are too large, we have better to use the optimized GEMM
|
// If the matrices are too large, we have better to use the optimized GEMM
|
||||||
// routines which allocates temporaries. However, on some platforms
|
// 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
|
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
// 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.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
@ -29,8 +29,8 @@
|
|||||||
template<typename Derived1, typename Derived2>
|
template<typename Derived1, typename Derived2>
|
||||||
bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = precision<typename Derived1::RealScalar>())
|
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
|
return !((m1-m2).cwiseAbs2().maxCoeff() < epsilon * epsilon
|
||||||
* std::max(m1.cwise().abs2().maxCoeff(), m2.cwise().abs2().maxCoeff()));
|
* std::max(m1.cwiseAbs2().maxCoeff(), m2.cwiseAbs2().maxCoeff()));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename MatrixType> void product(const MatrixType& m)
|
template<typename MatrixType> void product(const MatrixType& m)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user