...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::constant_buffer_iterator — An iterator for a buffer in the constant
memory space.
// In header: <boost/compute/iterator/constant_buffer_iterator.hpp> template<typename T> class constant_buffer_iterator { public: // types typedef unspecified super_type; typedef super_type::reference reference; typedef super_type::difference_type difference_type; // construct/copy/destruct constant_buffer_iterator(); constant_buffer_iterator(const buffer &, size_t); constant_buffer_iterator(const constant_buffer_iterator< T > &); constant_buffer_iterator< T > & operator=(const constant_buffer_iterator< T > &); ~constant_buffer_iterator(); // public member functions const buffer & get_buffer() const; size_t get_index() const; T read(command_queue &) const; void write(const T &, command_queue &); template<typename Expr> unspecified operator[](const Expr &) const; // private member functions reference dereference() const; bool equal(const constant_buffer_iterator< T > &) const; void increment(); void decrement(); void advance(difference_type); difference_type distance_to(const constant_buffer_iterator< T > &) const; };
The constant_buffer_iterator class provides an iterator for values in a buffer in the constant
memory space.
For iterating over values in the global
memory space (the most common case), use the buffer_iterator class.
See Also:
constant_buffer_iterator
public
construct/copy/destructconstant_buffer_iterator();
constant_buffer_iterator(const buffer & buffer, size_t index);
constant_buffer_iterator(const constant_buffer_iterator< T > & other);
constant_buffer_iterator< T > & operator=(const constant_buffer_iterator< T > & other);
~constant_buffer_iterator();
constant_buffer_iterator
private member functionsreference dereference() const;
bool equal(const constant_buffer_iterator< T > & other) const;
void increment();
void decrement();
void advance(difference_type n);
difference_type distance_to(const constant_buffer_iterator< T > & other) const;