From ba6ed5fa5f41918f94c297b67d3e29d886d37522 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 2 Jan 2010 13:04:04 -0500 Subject: [PATCH] Fix CoeffReadCost in Part: it must account for the cost of the conditional jump. This makes Part considered an "expensive" xpr that must be evaluated in operations such as Product. This fixes bug #80. --- Eigen/src/Core/Part.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/Part.h b/Eigen/src/Core/Part.h index 96229f43b..65f4bc194 100644 --- a/Eigen/src/Core/Part.h +++ b/Eigen/src/Core/Part.h @@ -50,7 +50,7 @@ struct ei_traits > : ei_traits typedef typename ei_unref::type _MatrixTypeNested; enum { Flags = (_MatrixTypeNested::Flags & (HereditaryBits) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit))) | Mode, - CoeffReadCost = _MatrixTypeNested::CoeffReadCost + CoeffReadCost = _MatrixTypeNested::CoeffReadCost + ConditionalJumpCost }; };