All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | List of all members
blaze::DenseIterator< Type > Class Template Reference

Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a generic random-access iterator that can be used for dense vectors and specific rows/columns of dense matrices. More...

#include <DenseIterator.h>

Public Types

typedef
std::random_access_iterator_tag 
IteratorCategory
 The iterator category.
 
typedef Type ValueType
 Type of the underlying elements.
 
typedef Type * PointerType
 Pointer return type.
 
typedef Type & ReferenceType
 Reference return type.
 
typedef ptrdiff_t DifferenceType
 Difference between two iterators.
 
typedef IteratorCategory iterator_category
 The iterator category.
 
typedef ValueType value_type
 Type of the underlying elements.
 
typedef PointerType pointer
 Pointer return type.
 
typedef ReferenceType reference
 Reference return type.
 
typedef DifferenceType difference_type
 Difference between two iterators.
 
typedef IntrinsicTrait< Type >
::Type 
IntrinsicType
 Intrinsic type of the elements.
 

Public Member Functions

Constructors
 DenseIterator ()
 Default constructor for the DenseIterator class.
 
 DenseIterator (Type *ptr)
 Constructor for the DenseIterator class. More...
 
template<typename Other >
 DenseIterator (const DenseIterator< Other > &it)
 Conversion constructor from different DenseIterator instances. More...
 
Assignment operators
DenseIteratoroperator+= (ptrdiff_t inc)
 Addition assignment operator. More...
 
DenseIteratoroperator-= (ptrdiff_t inc)
 Subtraction assignment operator. More...
 
Increment/decrement operators
DenseIteratoroperator++ ()
 Pre-increment operator. More...
 
const DenseIterator operator++ (int)
 Post-increment operator. More...
 
DenseIteratoroperator-- ()
 Pre-decrement operator. More...
 
const DenseIterator operator-- (int)
 Post-decrement operator. More...
 
Access operators
ReferenceType operator[] (size_t index) const
 Direct access to the underlying elements. More...
 
ReferenceType operator* () const
 Direct access to the element at the current iterator position. More...
 
PointerType operator-> () const
 Direct access to the element at the current iterator position. More...
 
Utility functions
PointerType base () const
 Low-level access to the underlying member of the iterator. More...
 
Expression template evaluation functions
const IntrinsicType load () const
 Aligned load of the intrinsic element at the current iterator position. More...
 
const IntrinsicType loadu () const
 Unaligned load of the intrinsic element at the current iterator position. More...
 

Private Attributes

Member variables
PointerType ptr_
 Pointer to the current element.
 

Detailed Description

template<typename Type>
class blaze::DenseIterator< Type >

Implementation of a generic iterator for dense vectors and matrices.

The DenseIterator represents a generic random-access iterator that can be used for dense vectors and specific rows/columns of dense matrices.

Constructor & Destructor Documentation

template<typename Type >
blaze::DenseIterator< Type >::DenseIterator ( Type *  ptr)
inlineexplicit

Constructor for the DenseIterator class.

Parameters
ptrPointer to the initial element.
template<typename Type >
template<typename Other >
blaze::DenseIterator< Type >::DenseIterator ( const DenseIterator< Other > &  it)
inline

Conversion constructor from different DenseIterator instances.

Parameters
itThe foreign DenseIterator instance to be copied.

Member Function Documentation

template<typename Type >
DenseIterator< Type >::PointerType blaze::DenseIterator< Type >::base ( ) const
inline

Low-level access to the underlying member of the iterator.

Returns
Pointer to the current memory location.
template<typename Type >
const DenseIterator< Type >::IntrinsicType blaze::DenseIterator< Type >::load ( ) const
inline

Aligned load of the intrinsic element at the current iterator position.

Returns
The loaded intrinsic element.

This function performs an aligned load of the intrinsic element of the current element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename Type >
const DenseIterator< Type >::IntrinsicType blaze::DenseIterator< Type >::loadu ( ) const
inline

Unaligned load of the intrinsic element at the current iterator position.

Returns
The loaded intrinsic element.

This function performs an unaligned load of the intrinsic element of the current element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename Type >
DenseIterator< Type >::ReferenceType blaze::DenseIterator< Type >::operator* ( ) const
inline

Direct access to the element at the current iterator position.

Returns
Reference to the current element.
template<typename Type >
DenseIterator< Type > & blaze::DenseIterator< Type >::operator++ ( )
inline

Pre-increment operator.

Returns
Reference to the incremented iterator.
template<typename Type >
const DenseIterator< Type > blaze::DenseIterator< Type >::operator++ ( int  )
inline

Post-increment operator.

Returns
The previous position of the iterator.
template<typename Type >
DenseIterator< Type > & blaze::DenseIterator< Type >::operator+= ( ptrdiff_t  inc)
inline

Addition assignment operator.

Parameters
incThe increment of the iterator.
Returns
Reference to the incremented iterator.
template<typename Type >
DenseIterator< Type > & blaze::DenseIterator< Type >::operator-- ( )
inline

Pre-decrement operator.

Returns
Reference to the decremented iterator.
template<typename Type >
const DenseIterator< Type > blaze::DenseIterator< Type >::operator-- ( int  )
inline

Post-decrement operator.

Returns
The previous position of the iterator.
template<typename Type >
DenseIterator< Type > & blaze::DenseIterator< Type >::operator-= ( ptrdiff_t  dec)
inline

Subtraction assignment operator.

Parameters
decThe decrement of the iterator.
Returns
Reference to the decremented iterator.
template<typename Type >
DenseIterator< Type >::PointerType blaze::DenseIterator< Type >::operator-> ( ) const
inline

Direct access to the element at the current iterator position.

Returns
Pointer to the element at the current iterator position.
template<typename Type >
DenseIterator< Type >::ReferenceType blaze::DenseIterator< Type >::operator[] ( size_t  index) const
inline

Direct access to the underlying elements.

Parameters
indexAccess index.
Returns
Reference to the accessed value.

The documentation for this class was generated from the following file: