|
HDK
|
#include <UT_PackedArrayOfArrays.h>
Public Types | |
| typedef UT_Array< T > | value_type |
Public Member Functions | |
| UT_PackedArrayOfArrays () | |
| void | clear () |
| bool | isEmpty () const |
| exint | size () const |
| Returns the number of arrays in this structure. More... | |
| exint | entries () const |
| int64 | getMemoryUsage (bool inclusive=false) const |
| void | append (const UT_Array< T > &arr) |
| Adds a new array to the end of our list of arrays. More... | |
| void | append (const T *data, exint len) |
| void | append (const UT_PackedArrayOfArrays< T > &arr, exint idx) |
| void | concat (const UT_PackedArrayOfArrays< T > &arr) |
| Appends an array of arrays to our list. More... | |
| void | concat (UT_PackedArrayOfArrays< T > &&arr) |
| Moves an array of arrays to our list. More... | |
| T * | appendArray (exint len) |
| template<typename TLD = void, typename FUNC > | |
| T * | allocateArraysNoInit (exint n, FUNC &&countfunctor) |
| const T & | operator() (exint idx, exint idx_in_array) const |
| From the given idxth array, return the idx_in_array element. More... | |
| void | extract (UT_Array< T > &result, exint idx) const |
| Extracts an array into a UT_Array. More... | |
| T * | arrayData (exint idx) |
| const T * | arrayData (exint idx) const |
| exint | arrayLen (exint idx) const |
| UT_Span< const T > | span (exint idx) const |
| void | truncate (exint maxsize) |
| Decreases, but never expands, to the given maxsize. More... | |
| void | setDataCapacity (exint capacity) |
| void | setDataCapacityIfNeeded (exint capacity) |
| void | setArrayCapacity (exint capacity) |
| void | setArrayCapacityIfNeeded (exint capacity) |
| UT_Array< exint > & | rawOffsets () |
| const UT_Array< exint > & | rawOffsets () const |
| UT_Array< T > & | rawData () |
| All of the array data is in one contiguous block. More... | |
| const UT_Array< T > & | rawData () const |
| UT_IteratorRange< T * > | arrayRange (exint idx) |
| UT_IteratorRange< const T * > | arrayRange (exint idx) const |
Definition at line 26 of file UT_PackedArrayOfArrays.h.
| typedef UT_Array<T> UT_PackedArrayOfArrays< T >::value_type |
Definition at line 29 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 31 of file UT_PackedArrayOfArrays.h.
|
inline |
Appends new arrays in parallel using a functor to compute element count per array.
The functor takes the form exint(exint) or optionally exint(exint, TLD&) where TLD is some thread-local data that can be reused by the functor.
Example:
data.allocateArraysNoInit( gdp->getNumPrimitives(), [&](exint i) { return gdp->getPrimitiveVertexCount(gdp->primitiveOffset(i)); });
Example with TLD:
data.allocateArraysNoInit<GA_OffsetArray>( gdp->getNumPoints(), [&](exint i, GA_OffsetArray &offsets) { gdp->getPrimitivesReferencingPoint(offsets, gdp->pointOffset(i)); return offsets.size(); });
Definition at line 135 of file UT_PackedArrayOfArrays.h.
|
inline |
Adds a new array to the end of our list of arrays.
Definition at line 52 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 54 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 63 of file UT_PackedArrayOfArrays.h.
|
inline |
Appends a new array and returns a pointer to the resulting data so it can be filled in.
Definition at line 98 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 188 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 196 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 201 of file UT_PackedArrayOfArrays.h.
|
inline |
Returns an iterator range for the specified array.
Definition at line 212 of file UT_PackedArrayOfArrays.h.
|
inline |
Returns an iterator range for the specified array.
Definition at line 214 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 35 of file UT_PackedArrayOfArrays.h.
|
inline |
Appends an array of arrays to our list.
Definition at line 67 of file UT_PackedArrayOfArrays.h.
|
inline |
Moves an array of arrays to our list.
Definition at line 76 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 42 of file UT_PackedArrayOfArrays.h.
|
inline |
Extracts an array into a UT_Array.
Definition at line 178 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 44 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 37 of file UT_PackedArrayOfArrays.h.
|
inline |
From the given idxth array, return the idx_in_array element.
Definition at line 169 of file UT_PackedArrayOfArrays.h.
|
inline |
All of the array data is in one contiguous block.
Definition at line 252 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 253 of file UT_PackedArrayOfArrays.h.
|
inline |
The raw offset table stores the end of each array in the data array. Each array has [rawOffsets(idx) ... rawOffsets(idx+1))
Definition at line 248 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 249 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 240 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 242 of file UT_PackedArrayOfArrays.h.
|
inline |
These adjust the capacity without adjusting the entries and are useful for pre-allocing the amount when known in advance.
Definition at line 236 of file UT_PackedArrayOfArrays.h.
|
inline |
Definition at line 238 of file UT_PackedArrayOfArrays.h.
|
inline |
Returns the number of arrays in this structure.
Definition at line 41 of file UT_PackedArrayOfArrays.h.
Definition at line 205 of file UT_PackedArrayOfArrays.h.
|
inline |
Decreases, but never expands, to the given maxsize.
Definition at line 219 of file UT_PackedArrayOfArrays.h.