PrevUpHomeNext

Class template counting_iterator

boost::compute::counting_iterator

Synopsis

// In header: <boost/compute/iterator/counting_iterator.hpp>

template<typename T> 
class counting_iterator {
public:
  // types
  typedef unspecified                 super_type;     
  typedef super_type::reference       reference;      
  typedef super_type::difference_type difference_type;

  // construct/copy/destruct
  counting_iterator(const T &);
  counting_iterator(const counting_iterator< T > &);
  counting_iterator< T > & operator=(const counting_iterator< T > &);
  ~counting_iterator();

  // public member functions
  size_t get_index() const;
  template<typename Expr> unspecified operator[](const Expr &) const;

  // private member functions
  reference dereference() const;
  bool equal(const counting_iterator< T > &) const;
  void increment();
  void decrement();
  void advance(difference_type);
  difference_type distance_to(const counting_iterator< T > &) const;
};

Description

counting_iterator public construct/copy/destruct

  1. counting_iterator(const T & init);
  2. counting_iterator(const counting_iterator< T > & other);
  3. counting_iterator< T > & operator=(const counting_iterator< T > & other);
  4. ~counting_iterator();

counting_iterator public member functions

  1. size_t get_index() const;
  2. template<typename Expr> unspecified operator[](const Expr & expr) const;

counting_iterator private member functions

  1. reference dereference() const;
  2. bool equal(const counting_iterator< T > & other) const;
  3. void increment();
  4. void decrement();
  5. void advance(difference_type n);
  6. difference_type distance_to(const counting_iterator< T > & other) const;

PrevUpHomeNext