mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 09:23:12 +08:00
fix static allocation of workspace
This commit is contained in:
parent
ced1a45f82
commit
7dbbc6ffd1
@ -299,7 +299,7 @@ class ei_gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols
|
|||||||
enum {
|
enum {
|
||||||
SizeA = ActualRows * MaxDepth,
|
SizeA = ActualRows * MaxDepth,
|
||||||
SizeB = ActualCols * MaxDepth,
|
SizeB = ActualCols * MaxDepth,
|
||||||
SizeW = MaxDepth * Traits::nr * ei_packet_traits<RhsScalar>::size
|
SizeW = MaxDepth * Traits::WorkSpaceFactor
|
||||||
};
|
};
|
||||||
|
|
||||||
EIGEN_ALIGN16 LhsScalar m_staticA[SizeA];
|
EIGEN_ALIGN16 LhsScalar m_staticA[SizeA];
|
||||||
@ -397,18 +397,17 @@ class GeneralProduct<Lhs, Rhs, GemmProduct>
|
|||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
EIGEN_PRODUCT_PUBLIC_INTERFACE(GeneralProduct)
|
EIGEN_PRODUCT_PUBLIC_INTERFACE(GeneralProduct)
|
||||||
|
|
||||||
GeneralProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs)
|
|
||||||
{
|
|
||||||
// TODO add a weak static assert
|
|
||||||
// EIGEN_STATIC_ASSERT((ei_is_same_type<typename Lhs::Scalar, typename Rhs::Scalar>::ret),
|
|
||||||
// YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef typename Lhs::Scalar LhsScalar;
|
typedef typename Lhs::Scalar LhsScalar;
|
||||||
typedef typename Rhs::Scalar RhsScalar;
|
typedef typename Rhs::Scalar RhsScalar;
|
||||||
typedef Scalar ResScalar;
|
typedef Scalar ResScalar;
|
||||||
|
|
||||||
|
GeneralProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs)
|
||||||
|
{
|
||||||
|
typedef ei_scalar_product_op<LhsScalar,RhsScalar> BinOp;
|
||||||
|
EIGEN_CHECK_BINARY_COMPATIBILIY(BinOp,LhsScalar,RhsScalar);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename Dest> void scaleAndAddTo(Dest& dst, Scalar alpha) const
|
template<typename Dest> void scaleAndAddTo(Dest& dst, Scalar alpha) const
|
||||||
{
|
{
|
||||||
ei_assert(dst.rows()==m_lhs.rows() && dst.cols()==m_rhs.cols());
|
ei_assert(dst.rows()==m_lhs.rows() && dst.cols()==m_rhs.cols());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user