NVBIO
|
A utility class to manage a vector of dynamically-allocated arrays
Definition at line 287 of file vector_array.h.
#include <vector_array.h>
Public Types | |
typedef device_tag | system_tag |
typedef VectorArrayView< T > | plain_view_type |
this object's plain view type More... | |
Public Methods | |
HostVectorArray () | |
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 |
HostVectorArray & | operator= (const DeviceVectorArray< T > &vec) |
HostVectorArray & | swap (HostVectorArray< T > &vec) |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const T * | operator[] (const uint32 index) const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 | slot (const uint32 index) const |
plain_view_type | plain_view () |
Public Members | |
thrust::host_vector< T > | m_arena |
memory arena More... | |
thrust::host_vector< uint32 > | m_index |
index of the allocated arrays More... | |
thrust::host_vector< uint32 > | m_sizes |
sizes of the allocated arrays More... | |
thrust::host_vector< uint32 > | m_pool |
pool counter More... | |
typedef VectorArrayView<T> nvbio::HostVectorArray< T >::plain_view_type |
this object's plain view type
Definition at line 290 of file vector_array.h.
typedef device_tag nvbio::HostVectorArray< T >::system_tag |
Definition at line 289 of file vector_array.h.
|
inline |
constructor
Definition at line 294 of file vector_array.h.
|
inline |
return allocated size
Definition at line 343 of file vector_array.h.
|
inline |
clear the pool
Definition at line 335 of file vector_array.h.
|
inline |
check for overlows
Definition at line 331 of file vector_array.h.
|
inline |
copy operator
Definition at line 347 of file vector_array.h.
|
inline |
return the vector corresponding to the given index
Definition at line 370 of file vector_array.h.
|
inline |
return the plain view of this object
Definition at line 383 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 306 of file vector_array.h.
|
inline |
return number of vectors
Definition at line 339 of file vector_array.h.
|
inline |
return the slot corresponding to the given index
Definition at line 379 of file vector_array.h.
|
inline |
swap
Definition at line 358 of file vector_array.h.
thrust::host_vector<T> nvbio::HostVectorArray< T >::m_arena |
memory arena
Definition at line 393 of file vector_array.h.
thrust::host_vector<uint32> nvbio::HostVectorArray< T >::m_index |
index of the allocated arrays
Definition at line 394 of file vector_array.h.
thrust::host_vector<uint32> nvbio::HostVectorArray< T >::m_pool |
pool counter
Definition at line 396 of file vector_array.h.
thrust::host_vector<uint32> nvbio::HostVectorArray< T >::m_sizes |
sizes of the allocated arrays
Definition at line 395 of file vector_array.h.