remove MakeBase, use ei_dense_xpr_base instead

(yes, it was only used in dense xprs anyway)
This commit is contained in:
Benoit Jacob
2010-04-23 12:16:30 -04:00
parent a16ba80bfa
commit e3e34b5920
19 changed files with 52 additions and 52 deletions

View File

@@ -54,8 +54,6 @@ template<typename Derived> class ArrayBase
#ifndef EIGEN_PARSED_BY_DOXYGEN
/** The base class for a given storage type. */
typedef ArrayBase StorageBaseType;
/** Construct the base class type for the derived class OtherDerived */
template <typename OtherDerived> struct MakeBase { typedef ArrayBase<OtherDerived> Type; };
using ei_special_scalar_op_base<Derived,typename ei_traits<Derived>::Scalar,
typename NumTraits<typename ei_traits<Derived>::Scalar>::Real>::operator*;

View File

@@ -44,6 +44,7 @@ struct ei_traits<Replicate<MatrixType,RowFactor,ColFactor> >
{
typedef typename MatrixType::Scalar Scalar;
typedef typename ei_traits<MatrixType>::StorageKind StorageKind;
typedef typename ei_traits<MatrixType>::XprKind XprKind;
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
enum {
@@ -65,11 +66,11 @@ struct ei_traits<Replicate<MatrixType,RowFactor,ColFactor> >
};
template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
: public MatrixType::template MakeBase< Replicate<MatrixType,RowFactor,ColFactor> >::Type
: public ei_dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type
{
public:
typedef typename MatrixType::template MakeBase< Replicate<MatrixType,RowFactor,ColFactor> >::Type Base;
typedef typename ei_dense_xpr_base<Replicate>::type Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Replicate)
template<typename OriginalMatrixType>

View File

@@ -47,6 +47,7 @@ struct ei_traits<Reverse<MatrixType, Direction> >
{
typedef typename MatrixType::Scalar Scalar;
typedef typename ei_traits<MatrixType>::StorageKind StorageKind;
typedef typename ei_traits<MatrixType>::XprKind XprKind;
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
enum {
@@ -75,11 +76,11 @@ template<typename PacketScalar> struct ei_reverse_packet_cond<PacketScalar,false
};
template<typename MatrixType, int Direction> class Reverse
: public MatrixType::template MakeBase< Reverse<MatrixType, Direction> >::Type
: public ei_dense_xpr_base< Reverse<MatrixType, Direction> >::type
{
public:
typedef typename MatrixType::template MakeBase< Reverse<MatrixType, Direction> >::Type Base;
typedef typename ei_dense_xpr_base<Reverse>::type Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Reverse)
using Base::IsRowMajor;

View File

@@ -47,6 +47,7 @@ struct ei_traits<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >
{
typedef typename ei_traits<ThenMatrixType>::Scalar Scalar;
typedef Dense StorageKind;
typedef typename ei_traits<ThenMatrixType>::XprKind XprKind;
typedef typename ConditionMatrixType::Nested ConditionMatrixNested;
typedef typename ThenMatrixType::Nested ThenMatrixNested;
typedef typename ElseMatrixType::Nested ElseMatrixNested;
@@ -64,11 +65,11 @@ struct ei_traits<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >
template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>
class Select : ei_no_assignment_operator,
public ThenMatrixType::template MakeBase< Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >::Type
public ei_dense_xpr_base< Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >::type
{
public:
typedef typename ThenMatrixType::template MakeBase< Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >::Type Base;
typedef typename ei_dense_xpr_base<Select>::type Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Select)
Select(const ConditionMatrixType& conditionMatrix,

View File

@@ -52,6 +52,7 @@ struct ei_traits<PartialReduxExpr<MatrixType, MemberOp, Direction> >
{
typedef typename MemberOp::result_type Scalar;
typedef typename ei_traits<MatrixType>::StorageKind StorageKind;
typedef typename ei_traits<MatrixType>::XprKind XprKind;
typedef typename MatrixType::Scalar InputScalar;
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
typedef typename ei_cleantype<MatrixTypeNested>::type _MatrixTypeNested;
@@ -76,11 +77,11 @@ struct ei_traits<PartialReduxExpr<MatrixType, MemberOp, Direction> >
template< typename MatrixType, typename MemberOp, int Direction>
class PartialReduxExpr : ei_no_assignment_operator,
public MatrixType::template MakeBase< PartialReduxExpr<MatrixType, MemberOp, Direction> >::Type
public ei_dense_xpr_base< PartialReduxExpr<MatrixType, MemberOp, Direction> >::type
{
public:
typedef typename MatrixType::template MakeBase< PartialReduxExpr<MatrixType, MemberOp, Direction> >::Type Base;
typedef typename ei_dense_xpr_base<PartialReduxExpr>::type Base;
EIGEN_DENSE_PUBLIC_INTERFACE(PartialReduxExpr)
typedef typename ei_traits<PartialReduxExpr>::MatrixTypeNested MatrixTypeNested;
typedef typename ei_traits<PartialReduxExpr>::_MatrixTypeNested _MatrixTypeNested;