aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CoreEvaluators.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/CoreEvaluators.h')
-rw-r--r--Eigen/src/Core/CoreEvaluators.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h
index cca01251c..5d991b74b 100644
--- a/Eigen/src/Core/CoreEvaluators.h
+++ b/Eigen/src/Core/CoreEvaluators.h
@@ -708,13 +708,25 @@ struct evaluator_impl<Map<PlainObjectType, MapOptions, StrideType> >
// -------------------- Block --------------------
+template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel,
+ bool HasDirectAccess = internal::has_direct_access<ArgType>::ret> struct block_evaluator;
+
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
-struct evaluator_impl<Block<ArgType, BlockRows, BlockCols, InnerPanel, /* HasDirectAccess */ false> >
- : evaluator_impl_base<Block<ArgType, BlockRows, BlockCols, InnerPanel, false> >
+struct evaluator_impl<Block<ArgType, BlockRows, BlockCols, InnerPanel> >
+ : block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel>
{
- typedef Block<ArgType, BlockRows, BlockCols, InnerPanel, false> XprType;
+ typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;
+ typedef block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel> block_evaluator_type;
+ evaluator_impl(const XprType& block) : block_evaluator_type(block) {}
+};
+
+template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
+struct block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel, /*HasDirectAccess*/ false>
+ : evaluator_impl_base<Block<ArgType, BlockRows, BlockCols, InnerPanel> >
+{
+ typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;
- evaluator_impl(const XprType& block)
+ block_evaluator(const XprType& block)
: m_argImpl(block.nestedExpression()),
m_startRow(block.startRow()),
m_startCol(block.startCol())
@@ -789,12 +801,12 @@ protected:
// all action is via the data() as returned by the Block expression.
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
-struct evaluator_impl<Block<ArgType, BlockRows, BlockCols, InnerPanel, /* HasDirectAccess */ true> >
- : evaluator_impl<MapBase<Block<ArgType, BlockRows, BlockCols, InnerPanel, true> > >
+struct block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel, /* HasDirectAccess */ true>
+ : evaluator_impl<MapBase<Block<ArgType, BlockRows, BlockCols, InnerPanel> > >
{
- typedef Block<ArgType, BlockRows, BlockCols, InnerPanel, true> XprType;
+ typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;
- evaluator_impl(const XprType& block)
+ block_evaluator(const XprType& block)
: evaluator_impl<MapBase<XprType> >(block)
{ }
};