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

Detailed description

template< typename T>
struct nvbio::VectorArrayView< T >

A utility class to manage a vector of dynamically-allocated arrays

Definition at line 106 of file vector_array.h.

#include <vector_array.h>

Public Methods

NVBIO_FORCEINLINE NVBIO_HOST_DEVICE VectorArrayView (T *arena=NULL, uint32 *index=NULL, uint32 *sizes=NULL, uint32 *pool=NULL, uint32 size=0u)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE T * 
alloc (const uint32 index, const uint32 size)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE T * 
operator[] (const uint32 index) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
slot (const uint32 index) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
size (const uint32 index) const
 

Public Members

T * m_arena
 memory arena More...
 
uint32m_index
 index of the allocated arrays More...
 
uint32m_sizes
 sizes of the allocated arrays More...
 
uint32m_pool
 pool counter More...
 
uint32 m_size
 size of the arena More...
 

Constructor & Destructor Documentation

template<typename T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::VectorArrayView< T >::VectorArrayView ( T *  arena = NULL,
uint32 index = NULL,
uint32 sizes = NULL,
uint32 pool = NULL,
uint32  size = 0u 
)
inline

constructor

Definition at line 111 of file vector_array.h.

Member Function Documentation

template<typename T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE T* nvbio::VectorArrayView< T >::alloc ( const uint32  index,
const uint32  size 
)
inline

alloc the vector bound to the given index

Definition at line 122 of file vector_array.h.

template<typename T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE T* nvbio::VectorArrayView< T >::operator[] ( const uint32  index) const
inline

return the vector corresponding to the given index

Definition at line 140 of file vector_array.h.

template<typename T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::VectorArrayView< T >::size ( const uint32  index) const
inline

return the size of the given array

Definition at line 154 of file vector_array.h.

template<typename T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::VectorArrayView< T >::slot ( const uint32  index) const
inline

return the slot corresponding to the given index

Definition at line 149 of file vector_array.h.

Member Data Documentation

template<typename T>
T* nvbio::VectorArrayView< T >::m_arena

memory arena

Definition at line 157 of file vector_array.h.

template<typename T>
uint32* nvbio::VectorArrayView< T >::m_index

index of the allocated arrays

Definition at line 158 of file vector_array.h.

template<typename T>
uint32* nvbio::VectorArrayView< T >::m_pool

pool counter

Definition at line 160 of file vector_array.h.

template<typename T>
uint32 nvbio::VectorArrayView< T >::m_size

size of the arena

Definition at line 161 of file vector_array.h.

template<typename T>
uint32* nvbio::VectorArrayView< T >::m_sizes

sizes of the allocated arrays

Definition at line 159 of file vector_array.h.


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