NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | Public Members | List of all members
nvbio::vector_view< Iterator, IndexType > Struct Template Reference

Detailed description

template< typename Iterator, typename IndexType = uint32>
struct nvbio::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

Definition at line 88 of file vector_view.h.

#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

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

Public Members

IndexType m_size
 
Iterator m_vec
 

Member Typedef Documentation

template<typename Iterator, typename IndexType = uint32>
typedef Iterator nvbio::vector_view< Iterator, IndexType >::const_iterator

Definition at line 91 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef vector_view<Iterator,IndexType> nvbio::vector_view< Iterator, IndexType >::const_plain_view_type

Definition at line 104 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef to_const<reference>::type nvbio::vector_view< Iterator, IndexType >::const_reference

Definition at line 96 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef iterator_traits<Iterator>::difference_type nvbio::vector_view< Iterator, IndexType >::difference_type

Definition at line 100 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef iterator_traits<Iterator>::forward_iterator nvbio::vector_view< Iterator, IndexType >::forward_iterator

Definition at line 92 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef IndexType nvbio::vector_view< Iterator, IndexType >::index_type

Definition at line 99 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef Iterator nvbio::vector_view< Iterator, IndexType >::iterator

Definition at line 90 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef std::random_access_iterator_tag nvbio::vector_view< Iterator, IndexType >::iterator_category

Definition at line 101 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef vector_view<Iterator,IndexType> nvbio::vector_view< Iterator, IndexType >::plain_view_type

Definition at line 103 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef iterator_traits<Iterator>::pointer nvbio::vector_view< Iterator, IndexType >::pointer

Definition at line 97 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef iterator_traits<Iterator>::reference nvbio::vector_view< Iterator, IndexType >::reference

Definition at line 95 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef IndexType nvbio::vector_view< Iterator, IndexType >::size_type

Definition at line 98 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
typedef iterator_traits<Iterator>::value_type nvbio::vector_view< Iterator, IndexType >::value_type

Definition at line 94 of file vector_view.h.

Constructor & Destructor Documentation

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::vector_view< Iterator, IndexType >::vector_view ( )
inline

constructor

Definition at line 109 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::vector_view< Iterator, IndexType >::vector_view ( const IndexType  size,
Iterator  vec 
)
inline

constructor

Definition at line 114 of file vector_view.h.

Member Function Documentation

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_reference nvbio::vector_view< Iterator, IndexType >::back ( void  ) const
inline

return reference to back

Definition at line 174 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE reference nvbio::vector_view< Iterator, IndexType >::back ( void  )
inline

return reference to back

Definition at line 179 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Iterator nvbio::vector_view< Iterator, IndexType >::base ( ) const
inline

return the base iterator

Definition at line 184 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_iterator nvbio::vector_view< Iterator, IndexType >::begin ( void  ) const
inline

return begin iterator

Definition at line 189 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE iterator nvbio::vector_view< Iterator, IndexType >::begin ( void  )
inline

return begin iterator

Definition at line 199 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::vector_view< Iterator, IndexType >::clear ( void  )
inline

clear

Definition at line 124 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool nvbio::vector_view< Iterator, IndexType >::empty ( void  ) const
inline

return true iff size is null

Definition at line 139 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_iterator nvbio::vector_view< Iterator, IndexType >::end ( void  ) const
inline

return end iterator

Definition at line 194 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE iterator nvbio::vector_view< Iterator, IndexType >::end ( void  )
inline

return end iterator

Definition at line 204 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_reference nvbio::vector_view< Iterator, IndexType >::front ( void  ) const
inline

return reference to front

Definition at line 164 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE reference nvbio::vector_view< Iterator, IndexType >::front ( void  )
inline

return reference to front

Definition at line 169 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE IndexType nvbio::vector_view< Iterator, IndexType >::length ( ) const
inline

return vector size

Definition at line 134 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::vector_view< Iterator, IndexType >::operator Iterator ( ) const
inline

automatic conversion to the basic iterator type

Definition at line 209 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_reference nvbio::vector_view< Iterator, IndexType >::operator* ( ) const
inline

dereference operator

Definition at line 144 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE reference nvbio::vector_view< Iterator, IndexType >::operator* ( )
inline

dereference operator

Definition at line 149 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_reference nvbio::vector_view< Iterator, IndexType >::operator[] ( const IndexType  i) const
inline

const indexing operator

Definition at line 154 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE reference nvbio::vector_view< Iterator, IndexType >::operator[] ( const IndexType  i)
inline

indexing operator

Definition at line 159 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::vector_view< Iterator, IndexType >::pop_back ( )
inline

pop back

Definition at line 219 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::vector_view< Iterator, IndexType >::push_back ( const_reference  val)
inline

push back

Definition at line 214 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::vector_view< Iterator, IndexType >::resize ( const uint32  sz)
inline

resize the vector

Definition at line 119 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE IndexType nvbio::vector_view< Iterator, IndexType >::size ( void  ) const
inline

return vector size

Definition at line 129 of file vector_view.h.

Member Data Documentation

template<typename Iterator, typename IndexType = uint32>
IndexType nvbio::vector_view< Iterator, IndexType >::m_size

Definition at line 221 of file vector_view.h.

template<typename Iterator, typename IndexType = uint32>
Iterator nvbio::vector_view< Iterator, IndexType >::m_vec

Definition at line 222 of file vector_view.h.


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