Merged in ezhulenev/eigen-02 (pull request PR-525)

Fix bug in partial reduction of expressions requiring evaluation
This commit is contained in:
Gael Guennebaud
2018-10-10 20:59:00 +00:00
2 changed files with 8 additions and 4 deletions

View File

@@ -134,7 +134,6 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
{
typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType;
typedef typename internal::nested_eval<ArgType,1>::type ArgTypeNested;
typedef typename internal::remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;
typedef typename ArgType::Scalar InputScalar;
typedef typename XprType::Scalar Scalar;
enum {
@@ -194,7 +193,7 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
PacketType packet(Index idx) const
{
enum { PacketSize = internal::unpacket_traits<PacketType>::size };
typedef Block<const ArgType,
typedef Block<typename internal::add_const_on_value_type<ArgTypeNested>::type,
Direction==Vertical ? int(ArgType::RowsAtCompileTime) : int(PacketSize),
Direction==Vertical ? int(PacketSize) : int(ArgType::ColsAtCompileTime),
true /* InnerPanel */> PanelType;