Cleaning pass on evaluators: remove the useless and error prone evaluator<>::type indirection.

This commit is contained in:
Gael Guennebaud
2015-09-02 21:38:40 +02:00
parent cda55ab245
commit 92b9f0e102
29 changed files with 92 additions and 106 deletions

View File

@@ -312,13 +312,11 @@ template<> struct AssignmentKind<DenseShape,HomogeneousShape> { typedef Dense2De
template<typename ArgType,int Direction>
struct unary_evaluator<Homogeneous<ArgType,Direction>, IndexBased>
: evaluator<typename Homogeneous<ArgType,Direction>::PlainObject >::type
: evaluator<typename Homogeneous<ArgType,Direction>::PlainObject >
{
typedef Homogeneous<ArgType,Direction> XprType;
typedef typename XprType::PlainObject PlainObject;
typedef typename evaluator<PlainObject>::type Base;
typedef evaluator<XprType> type;
typedef evaluator<PlainObject> Base;
typedef evaluator<XprType> nestedType;
explicit unary_evaluator(const XprType& op)
@@ -390,6 +388,8 @@ struct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, Homogeneous
typedef typename helper::Xpr RefactoredXpr;
typedef evaluator<RefactoredXpr> Base;
typedef evaluator<XprType> nestedType;
EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)
: Base( xpr.lhs().nestedExpression() .lazyProduct( xpr.rhs().template topRows<helper::Dim>(xpr.lhs().nestedExpression().cols()) )
+ ConstantBlock(xpr.rhs().row(xpr.rhs().rows()-1),xpr.lhs().rows(), 1) )
@@ -431,6 +431,8 @@ struct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, DenseShape,
typedef typename helper::Xpr RefactoredXpr;
typedef evaluator<RefactoredXpr> Base;
typedef evaluator<XprType> nestedType;
EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)
: Base( xpr.lhs().template leftCols<helper::Dim>(xpr.rhs().nestedExpression().rows()) .lazyProduct( xpr.rhs().nestedExpression() )
+ ConstantBlock(xpr.lhs().col(xpr.lhs().cols()-1),1,xpr.rhs().cols()) )