Bolt  1.3
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 (const iterator_base &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
 
void advance (difference_type n)
 
void increment ()
 
void decrement ()
 
template<typename OtherContainer >
bool equal (const iterator_base< OtherContainer > &rhs) const
 
value_type & operator[] (int x) const restrict(cpu
 
value_type & operator* () const restrict(cpu
 

Public Attributes

int m_Index
 
value_type amp
 

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_view>
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.

Member Data Documentation

template<typename T, template< typename, int RANK=1 > class CONT = concurrency::array_view>
template<typename Container>
value_type bolt::amp::device_vector< T, CONT >::iterator_base< Container >::amp
Initial value:
{
return m_Container[m_Index + x]

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