mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-20 16:47:37 +08:00
fix row cwise-prod column in coeff based products...
I really don't know why this worked so far...
This commit is contained in:
parent
55495dcbae
commit
c851044eae
@ -318,7 +318,7 @@ struct ei_product_coeff_vectorized_dyn_selector
|
|||||||
typedef typename Lhs::Index Index;
|
typedef typename Lhs::Index Index;
|
||||||
EIGEN_STRONG_INLINE static void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
EIGEN_STRONG_INLINE static void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
||||||
{
|
{
|
||||||
res = lhs.row(row).cwiseProduct(rhs.col(col)).sum();
|
res = lhs.row(row).transpose().cwiseProduct(rhs.col(col)).sum();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,1,RhsCols>
|
|||||||
typedef typename Lhs::Index Index;
|
typedef typename Lhs::Index Index;
|
||||||
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
||||||
{
|
{
|
||||||
res = lhs.cwiseProduct(rhs.col(col)).sum();
|
res = lhs.transpose().cwiseProduct(rhs.col(col)).sum();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,LhsRows,1>
|
|||||||
typedef typename Lhs::Index Index;
|
typedef typename Lhs::Index Index;
|
||||||
EIGEN_STRONG_INLINE static void run(Index row, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
EIGEN_STRONG_INLINE static void run(Index row, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
||||||
{
|
{
|
||||||
res = lhs.row(row).cwiseProduct(rhs).sum();
|
res = lhs.row(row).transpose().cwiseProduct(rhs).sum();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,1,1>
|
|||||||
typedef typename Lhs::Index Index;
|
typedef typename Lhs::Index Index;
|
||||||
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
|
||||||
{
|
{
|
||||||
res = lhs.cwiseProduct(rhs).sum();
|
res = lhs.transpose().cwiseProduct(rhs).sum();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user