|
NVBIO
|
A utility class to manage a vector of dynamically-allocated arrays
Definition at line 168 of file vector_array.h.
#include <vector_array.h>
Public Types | |
| typedef device_tag | system_tag |
| typedef VectorArrayView< T > | device_view_type |
| this object's plain view type More... | |
| typedef VectorArrayView< T > | plain_view_type |
| this object's plain view type More... | |
Public Methods | |
| DeviceVectorArray () | |
| uint64 | resize (const uint32 size, const uint32 arena, const bool do_alloc=true) |
| bool | has_overflown () |
| void | clear () |
| uint32 | size () const |
| uint32 | allocated_size () const |
| uint32 | arena_size () const |
| DeviceVectorArray & | operator= (const DeviceVectorArray< T > &vec) |
| DeviceVectorArray & | swap (DeviceVectorArray< T > &vec) |
| device_view_type | device_view () |
| plain_view_type | plain_view () |
Public Members | |
| thrust::device_vector< T > | m_arena |
| memory arena More... | |
| thrust::device_vector< uint32 > | m_index |
| index of the allocated arrays More... | |
| thrust::device_vector< uint32 > | m_sizes |
| sizes of the allocated arrays More... | |
| thrust::device_vector< uint32 > | m_pool |
| pool counter More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename T > | |
| VectorArrayView< T > | device_view (DeviceVectorArray< T > &vec) |
| template<typename T > | |
| VectorArrayView< T > | plain_view (DeviceVectorArray< T > &vec) |
| template<typename T > | |
| VectorArrayView< T > | plain_view (HostVectorArray< T > &vec) |
| typedef VectorArrayView<T> nvbio::DeviceVectorArray< T >::device_view_type |
this object's plain view type
Definition at line 171 of file vector_array.h.
| typedef VectorArrayView<T> nvbio::DeviceVectorArray< T >::plain_view_type |
this object's plain view type
Definition at line 172 of file vector_array.h.
| typedef device_tag nvbio::DeviceVectorArray< T >::system_tag |
Definition at line 170 of file vector_array.h.
|
inline |
constructor
Definition at line 176 of file vector_array.h.
|
inline |
return allocated size
Definition at line 225 of file vector_array.h.
|
inline |
return allocated size
Definition at line 229 of file vector_array.h.
|
inline |
clear the pool
Definition at line 217 of file vector_array.h.
|
inline |
return the device view of this object
Definition at line 255 of file vector_array.h.
|
inline |
check for overlows
Definition at line 213 of file vector_array.h.
|
inline |
copy operator
Definition at line 233 of file vector_array.h.
|
inline |
return the plain view of this object
Definition at line 267 of file vector_array.h.
|
inline |
resize the arena
| size | size of the array (i.e. number of vectors) |
| arena | size of the memory arena |
| do_alloc | a flag to indicate whether to really perform allocations; if false, the function will just return the amount of memory needed |
Definition at line 188 of file vector_array.h.
|
inline |
return number of vectors
Definition at line 221 of file vector_array.h.
|
inline |
swap
Definition at line 244 of file vector_array.h.
| thrust::device_vector<T> nvbio::DeviceVectorArray< T >::m_arena |
memory arena
Definition at line 277 of file vector_array.h.
| thrust::device_vector<uint32> nvbio::DeviceVectorArray< T >::m_index |
index of the allocated arrays
Definition at line 278 of file vector_array.h.
| thrust::device_vector<uint32> nvbio::DeviceVectorArray< T >::m_pool |
pool counter
Definition at line 280 of file vector_array.h.
| thrust::device_vector<uint32> nvbio::DeviceVectorArray< T >::m_sizes |
sizes of the allocated arrays
Definition at line 279 of file vector_array.h.
1.8.4