mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Fix scalar * product optimization when 'product' includes a selfadjoint matrix
This commit is contained in:
parent
d595fd31f5
commit
873401032b
@ -132,6 +132,13 @@ template<typename _MatrixType, unsigned int UpLo> class SelfAdjointView
|
||||
{
|
||||
return Product<OtherDerived,SelfAdjointView>(lhs.derived(),rhs);
|
||||
}
|
||||
|
||||
friend EIGEN_DEVICE_FUNC
|
||||
const SelfAdjointView<const CwiseUnaryOp<internal::scalar_multiple_op<Scalar>,MatrixType>,UpLo>
|
||||
operator*(const Scalar& s, const SelfAdjointView& mat)
|
||||
{
|
||||
return (s*mat.nestedExpression()).template selfadjointView<UpLo>();
|
||||
}
|
||||
|
||||
#else // EIGEN_TEST_EVALUATORS
|
||||
|
||||
|
@ -62,6 +62,14 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
|
||||
inline Index outerStride() const { return derived().outerStride(); }
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline Index innerStride() const { return derived().innerStride(); }
|
||||
|
||||
// dummy resize function
|
||||
void resize(Index nbRows, Index nbCols)
|
||||
{
|
||||
EIGEN_UNUSED_VARIABLE(nbRows);
|
||||
EIGEN_UNUSED_VARIABLE(nbCols);
|
||||
eigen_assert(nbRows==rows() && nbCols==nbCols);
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline Scalar coeff(Index row, Index col) const { return derived().coeff(row,col); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user