Fermat
Public Types | Public Methods | Public Members | List of all members
cugar::vector_view< Iterator, IndexType > Struct Template Reference

Detailed description

template<typename Iterator, typename IndexType = uint32>
struct cugar::vector_view< Iterator, IndexType >

Wrapper class to create a "vector"-like container on top of a generic base iterator. See VectorWrapperExampleSection.

Template Parameters
Iteratorbase iterator type

#include <vector_view.h>

Public Types

typedef Iterator iterator
 
typedef Iterator const_iterator
 
typedef iterator_traits< Iterator >::forward_iterator forward_iterator
 
typedef iterator_traits< Iterator >::value_type value_type
 
typedef iterator_traits< Iterator >::reference reference
 
typedef to_const< reference >::type const_reference
 
typedef iterator_traits< Iterator >::pointer pointer
 
typedef IndexType size_type
 
typedef IndexType index_type
 
typedef iterator_traits< Iterator >::difference_type difference_type
 
typedef std::random_access_iterator_tag iterator_category
 
typedef vector_view< Iterator, IndexType > plain_view_type
 
typedef vector_view< Iterator, IndexType > const_plain_view_type
 

Public Methods

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE vector_view ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE vector_view (const IndexType size, Iterator vec)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void resize (const uint32 sz)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void clear ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE IndexType size () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE IndexType length () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool empty () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference operator* () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference operator* ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference operator[] (const IndexType i) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference operator[] (const IndexType i)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference front (void) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference front (void)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference back (void) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference back (void)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator base () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator begin () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator end () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator begin ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator end ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE operator Iterator () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void push_back (const_reference val)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void pop_back ()
 

Public Members

IndexType m_size
 
Iterator m_vec
 

Constructor & Destructor Documentation

◆ vector_view() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::vector_view< Iterator, IndexType >::vector_view ( )
inline

constructor

◆ vector_view() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::vector_view< Iterator, IndexType >::vector_view ( const IndexType  size,
Iterator  vec 
)
inline

constructor

Member Function Documentation

◆ back() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference cugar::vector_view< Iterator, IndexType >::back ( void  ) const
inline

return reference to back

◆ back() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference cugar::vector_view< Iterator, IndexType >::back ( void  )
inline

return reference to back

◆ base()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator cugar::vector_view< Iterator, IndexType >::base ( ) const
inline

return the base iterator

◆ begin() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator cugar::vector_view< Iterator, IndexType >::begin ( ) const
inline

return begin iterator

◆ begin() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator cugar::vector_view< Iterator, IndexType >::begin ( )
inline

return begin iterator

◆ clear()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::vector_view< Iterator, IndexType >::clear ( )
inline

clear

◆ empty()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool cugar::vector_view< Iterator, IndexType >::empty ( ) const
inline

return true iff size is null

◆ end() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator cugar::vector_view< Iterator, IndexType >::end ( ) const
inline

return end iterator

◆ end() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator cugar::vector_view< Iterator, IndexType >::end ( )
inline

return end iterator

◆ front() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference cugar::vector_view< Iterator, IndexType >::front ( void  ) const
inline

return reference to front

◆ front() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference cugar::vector_view< Iterator, IndexType >::front ( void  )
inline

return reference to front

◆ length()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE IndexType cugar::vector_view< Iterator, IndexType >::length ( ) const
inline

return vector size

◆ operator Iterator()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::vector_view< Iterator, IndexType >::operator Iterator ( ) const
inline

automatic conversion to the basic iterator type

◆ operator*() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference cugar::vector_view< Iterator, IndexType >::operator* ( ) const
inline

dereference operator

◆ operator*() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference cugar::vector_view< Iterator, IndexType >::operator* ( )
inline

dereference operator

◆ operator[]() [1/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference cugar::vector_view< Iterator, IndexType >::operator[] ( const IndexType  i) const
inline

const indexing operator

◆ operator[]() [2/2]

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference cugar::vector_view< Iterator, IndexType >::operator[] ( const IndexType  i)
inline

indexing operator

◆ pop_back()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::vector_view< Iterator, IndexType >::pop_back ( )
inline

pop back

◆ push_back()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::vector_view< Iterator, IndexType >::push_back ( const_reference  val)
inline

push back

◆ resize()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::vector_view< Iterator, IndexType >::resize ( const uint32  sz)
inline

resize the vector

◆ size()

template<typename Iterator, typename IndexType = uint32>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE IndexType cugar::vector_view< Iterator, IndexType >::size ( ) const
inline

return vector size


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