Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Public Member Functions
TSQR::CacheBlockRangeIterator< MatrixViewType > Class Template Reference

Bidirectional iterator over a contiguous range of cache blocks. More...

#include <Tsqr_CacheBlocker.hpp>

List of all members.

Public Member Functions

 CacheBlockRangeIterator ()
 Default constructor.
 CacheBlockRangeIterator (const MatrixViewType &A, const CacheBlockingStrategy< ordinal_type, scalar_type > &strategy, const ordinal_type currentIndex, const bool reverse, const bool contiguousCacheBlocks)
 Standard constructor.
 CacheBlockRangeIterator (const CacheBlockRangeIterator &rhs)
 Copy constructor.
CacheBlockRangeIteratoroperator= (const CacheBlockRangeIterator &rhs)
 Assignment operator.
CacheBlockRangeIteratoroperator++ ()
 Prefix increment operator.
CacheBlockRangeIterator operator++ (int)
 Postfix increment operator.
bool operator== (const CacheBlockRangeIterator &rhs)
 Equality operator.
bool operator!= (const CacheBlockRangeIterator &rhs)
 Inequality operator.
MatrixViewType operator* () const
 A view of the current cache block.

Detailed Description

template<class MatrixViewType>
class TSQR::CacheBlockRangeIterator< MatrixViewType >

Bidirectional iterator over a contiguous range of cache blocks.

Author:
Mark Hoemmen

"Contiguous range of cache blocks" means that the indices of the cache blocks, as interpreted by the CacheBlocker object, are contiguous.

Definition at line 493 of file Tsqr_CacheBlocker.hpp.


Constructor & Destructor Documentation

template<class MatrixViewType >
TSQR::CacheBlockRangeIterator< MatrixViewType >::CacheBlockRangeIterator ( ) [inline]

Default constructor.

Note:
To implementers: We only implement a default constructor because all iterators (e.g., TrivialIterator) must be DefaultConstructible.

Definition at line 506 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
TSQR::CacheBlockRangeIterator< MatrixViewType >::CacheBlockRangeIterator ( const MatrixViewType &  A,
const CacheBlockingStrategy< ordinal_type, scalar_type > &  strategy,
const ordinal_type  currentIndex,
const bool  reverse,
const bool  contiguousCacheBlocks 
) [inline]

Standard constructor.

Parameters:
A[in] View of the matrix over whose cache block(s) to iterate.
strategy[in] Cache blocking strategy for a matrix with the same number of rows as the matrix A.
currentIndex[in] The iterator's current cache block index.
reverse[in] Whether to iterate over the cache blocks in reverse order of their indices.
contiguousCacheBlocks[in] Whether cache blocks in the matrix A are stored contiguously.

Definition at line 524 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
TSQR::CacheBlockRangeIterator< MatrixViewType >::CacheBlockRangeIterator ( const CacheBlockRangeIterator< MatrixViewType > &  rhs) [inline]

Copy constructor.

Definition at line 537 of file Tsqr_CacheBlocker.hpp.


Member Function Documentation

template<class MatrixViewType >
CacheBlockRangeIterator& TSQR::CacheBlockRangeIterator< MatrixViewType >::operator= ( const CacheBlockRangeIterator< MatrixViewType > &  rhs) [inline]

Assignment operator.

Definition at line 546 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
CacheBlockRangeIterator& TSQR::CacheBlockRangeIterator< MatrixViewType >::operator++ ( ) [inline]

Prefix increment operator.

Definition at line 556 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
CacheBlockRangeIterator TSQR::CacheBlockRangeIterator< MatrixViewType >::operator++ ( int  ) [inline]

Postfix increment operator.

This may be less efficient than prefix operator++, since the postfix operator has to make a copy of the iterator before modifying it.

Definition at line 569 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
bool TSQR::CacheBlockRangeIterator< MatrixViewType >::operator== ( const CacheBlockRangeIterator< MatrixViewType > &  rhs) [inline]

Equality operator.

Equality of cache block range iterators only tests the cache block index, not reverse-ness. This means we can compare a reverse-direction iterator with a forward-direction iterator, and vice versa.

Definition at line 581 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
bool TSQR::CacheBlockRangeIterator< MatrixViewType >::operator!= ( const CacheBlockRangeIterator< MatrixViewType > &  rhs) [inline]

Inequality operator.

Definition at line 588 of file Tsqr_CacheBlocker.hpp.

template<class MatrixViewType >
MatrixViewType TSQR::CacheBlockRangeIterator< MatrixViewType >::operator* ( ) const [inline]

A view of the current cache block.

If the current cache block index is invalid, this returns an empty cache block (that is, calling empty() on the returned view returns true).

Definition at line 599 of file Tsqr_CacheBlocker.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends