This class implements an array of arrays like object with contiguous storage.
More...
|
| void | setName (std::string const &name) |
| | Set the name to be displayed whenever the underlying Buffer's user call back is called. More...
|
| |
|
| | ArrayOfArrays (INDEX_TYPE const numArrays=0, INDEX_TYPE const defaultArrayCapacity=0) |
| | Constructor. More...
|
| |
| | ArrayOfArrays (ArrayOfArrays const &src) |
| | Copy constructor, performs a deep copy. More...
|
| |
|
| ArrayOfArrays (ArrayOfArrays &&)=default |
| | Default move constructor, performs a shallow copy.
|
| |
|
| ~ArrayOfArrays () |
| | Destructor, frees the values, sizes and offsets buffers.
|
| |
|
| constexpr ArrayOfArraysView< T, INDEX_TYPE const, false, BUFFER_TYPE > | toView () const & |
| |
| constexpr ArrayOfArraysView< T, INDEX_TYPE const, false, BUFFER_TYPE > | toView () const &&=delete |
| | Overload for rvalues that is deleted. More...
|
| |
| constexpr ArrayOfArraysView< T, INDEX_TYPE const, true, BUFFER_TYPE > | toViewConstSizes () const & |
| |
| constexpr ArrayOfArraysView< T, INDEX_TYPE const, true, BUFFER_TYPE > | toViewConstSizes () const &&=delete |
| | Overload for rvalues that is deleted. More...
|
| |
| constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > | toViewConst () const & |
| |
| constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > | toViewConst () const &&=delete |
| | Overload for rvalues that is deleted. More...
|
| |
|
| ArrayOfArrays & | operator= (ArrayOfArrays const &src) |
| | Copy assignment operator, performs a deep copy. More...
|
| |
| ArrayOfArrays & | operator= (ArrayOfArrays &&src) |
| | Default move assignment operator, performs a shallow copy. More...
|
| |
| void | assimilate (ArrayOfSets< T, INDEX_TYPE, BUFFER_TYPE > &&src) |
| | Steal the resources from an ArrayOfSets and convert it to an ArrayOfArrays. More...
|
| |
|
| INDEX_TYPE | size () const |
| |
|
| void | resize (INDEX_TYPE const newSize, INDEX_TYPE const defaultArrayCapacity=0) |
| | Set the number of arrays. More...
|
| |
|
| void | appendArray (INDEX_TYPE const n) |
| | Append an array. More...
|
| |
| template<typename ITER > |
| void | appendArray (ITER const first, ITER const last) |
| | Append an array. More...
|
| |
| template<typename ITER > |
| void | insertArray (INDEX_TYPE const i, ITER const first, ITER const last) |
| | Insert an array. More...
|
| |
| void | eraseArray (INDEX_TYPE const i) |
| | Erase an array. More...
|
| |
|
| template<typename ... ARGS> |
| void | emplaceBack (INDEX_TYPE const i, ARGS &&... args) |
| | Append a value to an array constructing it in place with the given arguments. More...
|
| |
| template<typename ITER > |
| void | appendToArray (INDEX_TYPE const i, ITER const first, ITER const last) |
| | Append values to an array. More...
|
| |
| template<typename ... ARGS> |
| void | emplace (INDEX_TYPE const i, INDEX_TYPE const j, ARGS &&... args) |
| | Insert a value into an array constructing it in place. More...
|
| |
| template<typename ITER > |
| void | insertIntoArray (INDEX_TYPE const i, INDEX_TYPE const j, ITER const first, ITER const last) |
| | Insert values into an array. More...
|
| |
| template<class ... ARGS> |
| void | resizeArray (INDEX_TYPE const i, INDEX_TYPE const newSize, ARGS &&... args) |
| | Set the number of values in an array. More...
|
| |
| void | clearArray (INDEX_TYPE const i) |
| | Clear the given array. More...
|
| |
| void | setCapacityOfArray (INDEX_TYPE const i, INDEX_TYPE const newCapacity) |
| | Set the capacity of an array. More...
|
| |
|
| void | move (MemorySpace const space, bool touch=true) const |
| | Move this ArrayOfArrays to the given memory space. More...
|
| |
|
|
using | INDEX_TYPE_NC = std::remove_const_t< INDEX_TYPE > |
| | Since INDEX_TYPE should always be const we need an alias for the non const version.
|
| |
|
using | SIZE_TYPE = std::conditional_t< CONST_SIZES, INDEX_TYPE const, INDEX_TYPE_NC > |
| | The type contained by the m_sizes buffer.
|
| |
| using | PairOfBuffers = std::pair< BUFFER_TYPE< U > &, BUFFER_TYPE< U > const & > |
| | Alias for a std::pair of buffers. More...
|
| |
|
using | ValueType = T |
| | An alias for the type contained in the inner arrays.
|
| |
|
using | IndexType = INDEX_TYPE |
| | The integer type used for indexing.
|
| |
|
using | value_type = T |
| | An alias for the type contained in the inner arrays, here for stl compatability.
|
| |
|
using | size_type = INDEX_TYPE |
| | The integer type used for indexing, here for stl compatability.
|
| |
| | ArrayOfArraysView (bool) |
| | Protected constructor to be used by parent classes. More...
|
| |
| void | resize (INDEX_TYPE const newSize, INDEX_TYPE const defaultArrayCapacity=0) |
| | Set the number of arrays. More...
|
| |
| void | reserve (INDEX_TYPE const newCapacity) |
| | Reserve space for the given number of arrays. More...
|
| |
| void | reserveValues (INDEX_TYPE const newValueCapacity, BUFFERS &... buffers) |
| | Reserve space for the given number of values. More...
|
| |
| void | compress (BUFFERS &... buffers) |
| | Compress the arrays so that the values of each array are contiguous with no extra capacity in between. More...
|
| |
| void | resizeFromOffsets (INDEX_TYPE const numSubArrays, INDEX_TYPE const *const offsets, BUFFERS &... buffers) |
| | Clears the array and creates a new array with the given number of sub-arrays. More...
|
| |
| void | resizeFromCapacities (INDEX_TYPE const numSubArrays, INDEX_TYPE const *const capacities, BUFFERS &... buffers) |
| | Clears the array and creates a new array with the given number of sub-arrays. More...
|
| |
| void | assimilate (ArrayOfArraysView< T, INDEX_TYPE, CONST_SIZES, BUFFER_TYPE > &&src) |
| | Steal the resources of src, clearing it in the process. More...
|
| |
| void | resizeImpl (INDEX_TYPE const newSize, INDEX_TYPE const defaultArrayCapacity, BUFFERS &... buffers) |
| | Set the number of arrays. More...
|
| |
| void | free (BUFFERS &... buffers) |
| | Destroy all the objects held by this array and free all associated memory. More...
|
| |
| void | setEqualTo (INDEX_TYPE const srcNumArrays, INDEX_TYPE const srcMaxOffset, BUFFER_TYPE< INDEX_TYPE > const &srcOffsets, BUFFER_TYPE< INDEX_TYPE > const &srcSizes, BUFFER_TYPE< T > const &srcValues, PAIRS_OF_BUFFERS &&... pairs) |
| | Set this ArrayOfArraysView equal to the provided arrays. More...
|
| |
| void | setCapacityOfArray (INDEX_TYPE const i, INDEX_TYPE const newCapacity, BUFFERS &... buffers) |
| | Set the capacity of the given array. More...
|
| |
| void | setName (std::string const &name) |
| | Set the name to be displayed whenever the underlying Buffer's user call back is called. More...
|
| |
| | ArrayOfArraysView ()=default |
| | A constructor to create an uninitialized ArrayOfArraysView. More...
|
| |
| | ArrayOfArraysView (ArrayOfArraysView const &)=default |
| | Default copy constructor. More...
|
| |
| LVARRAY_HOST_DEVICE constexpr | ArrayOfArraysView (ArrayOfArraysView &&src) |
| | Default move constructor. More...
|
| |
| LVARRAY_HOST_DEVICE constexpr | ArrayOfArraysView (INDEX_TYPE const numArrays, BUFFER_TYPE< INDEX_TYPE > const &offsets, BUFFER_TYPE< SIZE_TYPE > const &sizes, BUFFER_TYPE< T > const &values) |
| | Construct a new ArrayOfArraysView from the given buffers. More...
|
| |
| ArrayOfArraysView & | operator= (ArrayOfArraysView const &)=default |
| | Default copy assignment operator. More...
|
| |
| LVARRAY_HOST_DEVICE ArrayOfArraysView & | operator= (ArrayOfArraysView &&src) |
| | Move assignment operator.. More...
|
| |
| LVARRAY_HOST_DEVICE constexpr ArrayOfArraysView< T, INDEX_TYPE const, CONST_SIZES, BUFFER_TYPE > | toView () const |
| |
| LVARRAY_HOST_DEVICE constexpr ArrayOfArraysView< T, INDEX_TYPE const, true, BUFFER_TYPE > | toViewConstSizes () const |
| |
| LVARRAY_HOST_DEVICE constexpr ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > | toViewConst () const |
| |
| LVARRAY_HOST_DEVICE constexpr INDEX_TYPE_NC | size () const |
| |
| LVARRAY_HOST_DEVICE CONSTEXPR_WITHOUT_BOUNDS_CHECK INDEX_TYPE_NC | sizeOfArray (INDEX_TYPE const i) const |
| |
| LVARRAY_HOST_DEVICE constexpr SIZE_TYPE const * | getSizes () const |
| |
| LVARRAY_HOST_DEVICE constexpr INDEX_TYPE const * | getOffsets () const |
| |
| LVARRAY_HOST_DEVICE constexpr T const * | getValues () const |
| |
| LVARRAY_HOST_DEVICE CONSTEXPR_WITH_NDEBUG INDEX_TYPE_NC | capacity () const |
| |
| LVARRAY_HOST_DEVICE CONSTEXPR_WITHOUT_BOUNDS_CHECK INDEX_TYPE_NC | capacityOfArray (INDEX_TYPE const i) const |
| |
| LVARRAY_HOST_DEVICE constexpr INDEX_TYPE_NC | valueCapacity () const |
| |
| LVARRAY_HOST_DEVICE CONSTEXPR_WITHOUT_BOUNDS_CHECK ArraySlice< T, 1, 0, INDEX_TYPE_NC > | operator[] (INDEX_TYPE const i) const |
| |
| LVARRAY_HOST_DEVICE CONSTEXPR_WITHOUT_BOUNDS_CHECK T & | operator() (INDEX_TYPE const i, INDEX_TYPE const j) const |
| |
| LVARRAY_HOST_DEVICE void | emplaceBack (INDEX_TYPE const i, ARGS &&... args) const |
| | Append a value to an array. More...
|
| |
| LVARRAY_HOST_DEVICE void | emplaceBackAtomic (INDEX_TYPE const i, ARGS &&... args) const |
| | Append a value to an array in a thread safe manner. More...
|
| |
| LVARRAY_HOST_DEVICE void | appendToArray (INDEX_TYPE const i, ITER const first, ITER const last) const |
| | Append values to an array. More...
|
| |
| LVARRAY_HOST_DEVICE void | emplace (INDEX_TYPE const i, INDEX_TYPE const j, ARGS &&... args) const |
| | Insert a value into an array. More...
|
| |
| LVARRAY_HOST_DEVICE void | insertIntoArray (INDEX_TYPE const i, INDEX_TYPE const j, ITER const first, ITER const last) const |
| | Insert values into an array. More...
|
| |
| LVARRAY_HOST_DEVICE void | eraseFromArray (INDEX_TYPE const i, INDEX_TYPE const j, INDEX_TYPE const n=1) const |
| | Erase values from an array. More...
|
| |
| void | registerTouch (MemorySpace const space) const |
| | Touch the memory in space. More...
|
| |
| void | move (MemorySpace const space, bool touch=true) const |
| | Move this ArrayOfArrays to the given memory space. More...
|
| |
|
INDEX_TYPE_NC | m_numArrays |
| | The number of arrays contained.
|
| |
| BUFFER_TYPE< INDEX_TYPE > | m_offsets |
| |
|
BUFFER_TYPE< SIZE_TYPE > | m_sizes |
| | Holds the size of each array.
|
| |
| BUFFER_TYPE< T > | m_values |
| |
template<typename T, typename INDEX_TYPE, template< typename > class BUFFER_TYPE>
class LvArray::ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE >
This class implements an array of arrays like object with contiguous storage.
- Template Parameters
-
| T | the type stored in the arrays. |
| INDEX_TYPE | the integer to use for indexing. |