Bolt  1.1
C++ template library with support for OpenCL
Public Member Functions | Public Attributes | Friends | List of all members
bolt::amp::device_vector< T, CONT >::iterator_base< Container > Class Template Reference

Base class provided to encapsulate all the common functionality for constant and non-constant iterators. More...

#include <device_vector.h>

Inheritance diagram for bolt::amp::device_vector< T, CONT >::iterator_base< Container >:

Public Member Functions

 iterator_base (Container &rhs, size_type index)
 
template<typename OtherContainer >
 iterator_base (const iterator_base< OtherContainer > &rhs)
 
iterator_base< Container > & operator= (const iterator_base< Container > &rhs)
 
iterator_base< Container > & operator+= (const difference_type &n)
 
const iterator_base< Container > operator+ (const difference_type &n) const
 
Container & getContainer () const
 
size_type getIndex () const
 
difference_type distance_to (const iterator_base< Container > &rhs) const
 

Public Attributes

size_type m_Index
 

Friends

class boost::iterator_core_access
 
class device_vector< value_type >
 
template<typename >
class iterator_base
 

Detailed Description

template<typename T, template< typename, int RANK=1 > class CONT = concurrency::array>
template<typename Container>
class bolt::amp::device_vector< T, CONT >::iterator_base< Container >

Base class provided to encapsulate all the common functionality for constant and non-constant iterators.

See Also
http://www.sgi.com/tech/stl/Iterators.html
http://www.sgi.com/tech/stl/RandomAccessIterator.html
Bug:
operator[] with device_vector iterators result in a compile-time error when accessed for reading. Writing with operator[] appears to be OK. Workarounds: either use the operator[] on the device_vector container, or use iterator arithmetic instead, such as *(iter + 5) for reading from the iterator.

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