| 462 | |
| 463 | template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel> |
| 464 | class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::InnerVectorInnerIterator |
| 465 | : public EvalIterator |
| 466 | { |
| 467 | // NOTE MSVC fails to compile if we don't explicitly "import" IsRowMajor from unary_evaluator |
| 468 | // because the base class EvalIterator has a private IsRowMajor enum too. (bug #1786) |
| 469 | // NOTE We cannot call it IsRowMajor because it would shadow unary_evaluator::IsRowMajor |
| 470 | enum { XprIsRowMajor = unary_evaluator::IsRowMajor }; |
| 471 | const XprType& m_block; |
| 472 | Index m_end; |
| 473 | public: |
| 474 | |
| 475 | EIGEN_STRONG_INLINE InnerVectorInnerIterator(const unary_evaluator& aEval, Index outer) |
| 476 | : EvalIterator(aEval.m_argImpl, outer + (XprIsRowMajor ? aEval.m_block.startRow() : aEval.m_block.startCol())), |
| 477 | m_block(aEval.m_block), |
| 478 | m_end(XprIsRowMajor ? aEval.m_block.startCol()+aEval.m_block.blockCols() : aEval.m_block.startRow()+aEval.m_block.blockRows()) |
| 479 | { |
| 480 | while( (EvalIterator::operator bool()) && (EvalIterator::index() < (XprIsRowMajor ? m_block.startCol() : m_block.startRow())) ) |
| 481 | EvalIterator::operator++(); |
| 482 | } |
| 483 | |
| 484 | inline StorageIndex index() const { return EvalIterator::index() - convert_index<StorageIndex>(XprIsRowMajor ? m_block.startCol() : m_block.startRow()); } |
| 485 | inline Index outer() const { return EvalIterator::outer() - (XprIsRowMajor ? m_block.startRow() : m_block.startCol()); } |
| 486 | inline Index row() const { return EvalIterator::row() - m_block.startRow(); } |
| 487 | inline Index col() const { return EvalIterator::col() - m_block.startCol(); } |