OpenCL C++ Wrapper API 1.1
 All Classes Namespaces Files Functions Variables Typedefs Defines
Public Member Functions | Static Public Member Functions | Private Attributes
cl::vector< T, N >::iterator Class Reference

Iterator class for vectors. More...

#include <cl.hpp>

List of all members.

Public Member Functions

 iterator (void)
 ~iterator (void)
bool operator== (iterator i)
bool operator!= (iterator i)
void operator++ ()
void operator++ (int x)
void operator-- ()
void operator-- (int x)
operator* ()

Static Public Member Functions

static iterator begin (vector< T, N > &vec)
static iterator end (vector< T, N > &vec)

Private Attributes

vector< T, N > vec_
int index_
bool initialized_

Detailed Description

template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
class cl::vector< T, N >::iterator

Iterator class for vectors.

Definition at line 580 of file cl.hpp.


Constructor & Destructor Documentation

template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
cl::vector< T, N >::iterator::iterator ( void  ) [inline]

Definition at line 587 of file cl.hpp.

                       : 
            index_(-1),
            initialized_(false)
        {
            index_ = -1;
            initialized_ = false;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
cl::vector< T, N >::iterator::~iterator ( void  ) [inline]

Definition at line 595 of file cl.hpp.

{}

Member Function Documentation

template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
static iterator cl::vector< T, N >::iterator::begin ( vector< T, N > &  vec) [inline, static]

Definition at line 597 of file cl.hpp.

        {
            iterator i;

            if (!vec.empty()) {
                i.index_ = 0;
            }

            i.vec_ = vec;
            i.initialized_ = true;
            return i;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
static iterator cl::vector< T, N >::iterator::end ( vector< T, N > &  vec) [inline, static]

Definition at line 610 of file cl.hpp.

        {
            iterator i;

            if (!vec.empty()) {
                i.index_ = vec.size();
            }
            i.vec_ = vec;
            i.initialized_ = true;
            return i;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
bool cl::vector< T, N >::iterator::operator!= ( iterator  i) [inline]

Definition at line 629 of file cl.hpp.

        {
            return (!(*this==i));
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
T cl::vector< T, N >::iterator::operator* ( ) [inline]

Definition at line 654 of file cl.hpp.

        {
            return vec_[index_];
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
void cl::vector< T, N >::iterator::operator++ ( ) [inline]

Definition at line 634 of file cl.hpp.

        {
            index_++;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
void cl::vector< T, N >::iterator::operator++ ( int  x) [inline]

Definition at line 639 of file cl.hpp.

        {
            index_ += x;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
void cl::vector< T, N >::iterator::operator-- ( ) [inline]

Definition at line 644 of file cl.hpp.

        {
            index_--;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
void cl::vector< T, N >::iterator::operator-- ( int  x) [inline]

Definition at line 649 of file cl.hpp.

        {
            index_ -= x;
        }
template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
bool cl::vector< T, N >::iterator::operator== ( iterator  i) [inline]

Definition at line 622 of file cl.hpp.

        {
            return ((vec_ == i.vec_) && 
                    (index_ == i.index_) && 
                    (initialized_ == i.initialized_));
        }

Member Data Documentation

template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
int cl::vector< T, N >::iterator::index_ [private]

Definition at line 584 of file cl.hpp.

template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
bool cl::vector< T, N >::iterator::initialized_ [private]

Definition at line 585 of file cl.hpp.

template<typename T, unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
vector<T,N> cl::vector< T, N >::iterator::vec_ [private]

Definition at line 583 of file cl.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines