mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-16 13:45:58 +08:00
Fix nomalloc_3 and binding reference to temporary issue
This commit is contained in:
parent
e0f390793c
commit
79c3cfabe3
@ -85,10 +85,14 @@ class ProductBase : public MatrixBase<Derived>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
#ifndef EIGEN_NO_MALLOC
|
||||||
typedef typename Base::PlainObject BasePlainObject;
|
typedef typename Base::PlainObject BasePlainObject;
|
||||||
typedef Matrix<Scalar,RowsAtCompileTime==1?1:Dynamic,ColsAtCompileTime==1?1:Dynamic,BasePlainObject::Options> DynPlainObject;
|
typedef Matrix<Scalar,RowsAtCompileTime==1?1:Dynamic,ColsAtCompileTime==1?1:Dynamic,BasePlainObject::Options> DynPlainObject;
|
||||||
typedef typename internal::conditional<BasePlainObject::SizeAtCompileTime==Dynamic||BasePlainObject::SizeAtCompileTime*sizeof(Scalar) < EIGEN_STACK_ALLOCATION_LIMIT,
|
typedef typename internal::conditional<(BasePlainObject::SizeAtCompileTime==Dynamic) || (BasePlainObject::SizeAtCompileTime*sizeof(Scalar) < EIGEN_STACK_ALLOCATION_LIMIT),
|
||||||
BasePlainObject, DynPlainObject>::type PlainObject;
|
BasePlainObject, DynPlainObject>::type PlainObject;
|
||||||
|
#else
|
||||||
|
typedef typename Base::PlainObject PlainObject;
|
||||||
|
#endif
|
||||||
|
|
||||||
ProductBase(const Lhs& a_lhs, const Rhs& a_rhs)
|
ProductBase(const Lhs& a_lhs, const Rhs& a_rhs)
|
||||||
: m_lhs(a_lhs), m_rhs(a_rhs)
|
: m_lhs(a_lhs), m_rhs(a_rhs)
|
||||||
@ -183,12 +187,12 @@ namespace internal {
|
|||||||
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainObject>
|
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainObject>
|
||||||
struct nested<GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
|
struct nested<GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
|
||||||
{
|
{
|
||||||
typedef PlainObject const& type;
|
typedef typename GeneralProduct<Lhs,Rhs,Mode>::PlainObject const& type;
|
||||||
};
|
};
|
||||||
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainObject>
|
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainObject>
|
||||||
struct nested<const GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
|
struct nested<const GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
|
||||||
{
|
{
|
||||||
typedef PlainObject const& type;
|
typedef typename GeneralProduct<Lhs,Rhs,Mode>::PlainObject const& type;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user