mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
fix bug in computation of unrolling limit: div instead of mul
This commit is contained in:
parent
c905b31b42
commit
478bfaf228
@ -73,7 +73,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
UnrollingLimit = EIGEN_UNROLLING_LIMIT / (int(Vectorization) == int(NoVectorization) ? 1 : int(PacketSize)),
|
UnrollingLimit = EIGEN_UNROLLING_LIMIT * int(PacketSize),
|
||||||
MayUnrollCompletely = int(Derived::SizeAtCompileTime) * int(OtherDerived::CoeffReadCost) <= int(UnrollingLimit),
|
MayUnrollCompletely = int(Derived::SizeAtCompileTime) * int(OtherDerived::CoeffReadCost) <= int(UnrollingLimit),
|
||||||
MayUnrollInner = int(InnerSize * OtherDerived::CoeffReadCost) <= int(UnrollingLimit)
|
MayUnrollInner = int(InnerSize * OtherDerived::CoeffReadCost) <= int(UnrollingLimit)
|
||||||
};
|
};
|
||||||
@ -238,7 +238,7 @@ template<typename Derived1, typename Derived2>
|
|||||||
struct ei_assign_impl<Derived1, Derived2, NoVectorization, InnerUnrolling>
|
struct ei_assign_impl<Derived1, Derived2, NoVectorization, InnerUnrolling>
|
||||||
{
|
{
|
||||||
static void run(Derived1 &dst, const Derived2 &src)
|
static void run(Derived1 &dst, const Derived2 &src)
|
||||||
{
|
{
|
||||||
const bool rowMajor = int(Derived1::Flags)&RowMajorBit;
|
const bool rowMajor = int(Derived1::Flags)&RowMajorBit;
|
||||||
const int innerSize = rowMajor ? Derived1::ColsAtCompileTime : Derived1::RowsAtCompileTime;
|
const int innerSize = rowMajor ? Derived1::ColsAtCompileTime : Derived1::RowsAtCompileTime;
|
||||||
const int outerSize = rowMajor ? dst.rows() : dst.cols();
|
const int outerSize = rowMajor ? dst.rows() : dst.cols();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user