2D data vector with value semantics (STL style). More...
#include <arccore/collections/Array2.h>
Public Types | |
| typedef AbstractArray< T > | BaseClassType |
| typedef BaseClassType::ConstReferenceType | ConstReferenceType |
Public Member Functions | |
| UniqueArray2 () | |
| Creates an empty array. | |
| UniqueArray2 (Int64 size1, Int64 size2) | |
| Creates an array of size1 * size2 elements. | |
| UniqueArray2 (const Span2< const T > &view) | |
| Creates an array by copying the values from the view. | |
| UniqueArray2 (const ConstArray2View< T > &view) | |
| Creates an array by copying the values from the view. | |
| UniqueArray2 (const Array2< T > &rhs) | |
| Creates an array by copying the values of rhs. | |
| UniqueArray2 (const UniqueArray2< T > &rhs) | |
| Creates an array by copying the values of rhs. | |
| UniqueArray2 (const SharedArray2< T > &rhs) | |
| Creates an array by copying the values of rhs. | |
| UniqueArray2 (IMemoryAllocator *allocator) | |
| Creates an empty array with a specific allocator allocator. | |
| UniqueArray2 (IMemoryAllocator *allocator, Int64 size1, Int64 size2) | |
| Creates an array of size1 * size2 elements with a specific allocator allocator. | |
| UniqueArray2 (UniqueArray2< T > &&rhs) ARCCORE_NOEXCEPT | |
| Move constructor. rhs is invalidated after this call. | |
| UniqueArray2 & | operator= (const Array2< T > &rhs) |
| Copies the values of rhs into this instance. | |
| UniqueArray2 & | operator= (const SharedArray2< T > &rhs) |
| Copies the values of rhs into this instance. | |
| UniqueArray2 & | operator= (const UniqueArray2< T > &rhs) |
| Copies the values of rhs into this instance. | |
| UniqueArray2 & | operator= (ConstArray2View< T > rhs) |
| Copies the values of the view rhs into this instance. | |
| UniqueArray2 & | operator= (const Span2< const T > &rhs) |
| Copies the values of the view rhs into this instance. | |
| UniqueArray2 & | operator= (UniqueArray2< T > &&rhs) ARCCORE_NOEXCEPT |
| Move assignment operator. rhs is invalidated after this call. | |
| ~UniqueArray2 () override=default | |
| Destroys the array. | |
| void | swap (UniqueArray2< T > &rhs) ARCCORE_NOEXCEPT |
| Swaps the values of v1 and v2. | |
| UniqueArray2< T > | clone () |
| Clones the array. | |
| Public Member Functions inherited from Arcane::Array2< T > | |
| ArrayView< T > | operator[] (Int64 i) |
| ConstArrayView< T > | operator[] (Int64 i) const |
| ArrayView< T > | operator() (Int64 i) |
| ConstArrayView< T > | operator() (Int64 i) const |
| T & | operator() (Int64 i, Int64 j) |
| ConstReferenceType | operator() (Int64 i, Int64 j) const |
| T | item (Int64 i, Int64 j) |
| void | setItem (Int64 i, Int64 j, ConstReferenceType v) |
| ConstArrayView< T > | at (Int64 i) const |
| Element at index i. Always checks for bounds. | |
| ArrayView< T > | at (Int64 i) |
| Element at index i. Always checks for bounds. | |
| T | at (Int64 i, Int64 j) |
| void | fill (ConstReferenceType v) |
| void | clear () |
| Array2< T > | clone () |
| void | copy (Span2< const T > rhs) |
| Resizes the instance based on the dimensions of rhs and copies the values of rhs into it. | |
| Integer | capacity () const |
| Capacity (number of allocated elements) of the array. | |
| Int64 | largeCapacity () const |
| Capacity (number of allocated elements) of the array. | |
| void | reserve (Int64 new_capacity) |
| Reserves memory for new_capacity elements. | |
| void | shrink () |
| void | shrink (Int64 new_capacity) |
| Reallocates memory to have a capacity close to new_capacity. | |
| void | shrink_to_fit () |
| ArrayView< T > | viewAsArray () |
| View of the array as a 1D array. | |
| ConstArrayView< T > | viewAsArray () const |
| View of the array as a 1D array. | |
| Span< T > | to1DSpan () |
| View of the array as a 1D array. | |
| Span< const T > | to1DSpan () const |
| View of the array as a 1D array. | |
| operator Array2View< T > () | |
| operator ConstArray2View< T > () const | |
| operator Span2< const T > () const | |
| operator Span2< T > () | |
| Array2View< T > | view () |
| ConstArray2View< T > | constView () const |
| Span2< T > | span () |
| Span2< const T > | constSpan () const |
| Integer | dim2Size () const |
| Integer | dim1Size () const |
| Int64 | largeDim2Size () const |
| Int64 | largeDim1Size () const |
| void | add (const T &value) |
| void | resize (Int64 new_size) |
| Resizes only the first dimension, leaving the second dimension unchanged. | |
| void | resizeNoInit (Int64 new_size) |
| Resizes only the first dimension, leaving the second dimension unchanged. | |
| void | resize (Int64 new_size1, Int64 new_size2) |
| Reallocates both dimensions. | |
| void | resizeNoInit (Int64 new_size1, Int64 new_size2) |
| Reallocates both dimensions. | |
| Integer | totalNbElement () const |
| Total number of elements (dim1Size()*dim2Size()). | |
| Int64 | largeTotalNbElement () const |
| Total number of elements (largeDim1Size()*largeDim2Size()). | |
| MemoryAllocationOptions | allocationOptions () const |
| String | debugName () const |
| Debug name (null if no name specified). | |
| void | setDebugName (const String &name) |
| Sets the array name for debug information. | |
| ArrayView< T > | operator[] (Int64 i) |
| ConstArrayView< T > | operator[] (Int64 i) const |
| ArrayView< T > | operator() (Int64 i) |
| ConstArrayView< T > | operator() (Int64 i) const |
| T & | operator() (Int64 i, Int64 j) |
| ConstReferenceType | operator() (Int64 i, Int64 j) const |
| T | item (Int64 i, Int64 j) |
| void | setItem (Int64 i, Int64 j, ConstReferenceType v) |
| ConstArrayView< T > | at (Int64 i) const |
| Element at index i. Always checks for bounds. | |
| ArrayView< T > | at (Int64 i) |
| Element at index i. Always checks for bounds. | |
| T | at (Int64 i, Int64 j) |
| void | fill (ConstReferenceType v) |
| void | clear () |
| Array2< T > | clone () |
| void | copy (Span2< const T > rhs) |
| Resizes the instance based on the dimensions of rhs and copies the values of rhs into it. | |
| Integer | capacity () const |
| Capacity (number of allocated elements) of the array. | |
| Int64 | largeCapacity () const |
| Capacity (number of allocated elements) of the array. | |
| void | reserve (Int64 new_capacity) |
| Reserves memory for new_capacity elements. | |
| void | shrink () |
| void | shrink (Int64 new_capacity) |
| Reallocates memory to have a capacity close to new_capacity. | |
| void | shrink_to_fit () |
| ArrayView< T > | viewAsArray () |
| View of the array as a 1D array. | |
| ConstArrayView< T > | viewAsArray () const |
| View of the array as a 1D array. | |
| Span< T > | to1DSpan () |
| View of the array as a 1D array. | |
| Span< const T > | to1DSpan () const |
| View of the array as a 1D array. | |
| operator Array2View< T > () | |
| operator ConstArray2View< T > () const | |
| operator Span2< const T > () const | |
| operator Span2< T > () | |
| Array2View< T > | view () |
| ConstArray2View< T > | constView () const |
| Span2< T > | span () |
| Span2< const T > | constSpan () const |
| Integer | dim2Size () const |
| Integer | dim1Size () const |
| Int64 | largeDim2Size () const |
| Int64 | largeDim1Size () const |
| void | add (const T &value) |
| void | resize (Int64 new_size) |
| Resizes only the first dimension, leaving the second dimension unchanged. | |
| void | resize (Int64 new_size1, Int64 new_size2) |
| Reallocates both dimensions. | |
| void | resizeNoInit (Int64 new_size) |
| Resizes only the first dimension, leaving the second dimension unchanged. | |
| void | resizeNoInit (Int64 new_size1, Int64 new_size2) |
| Reallocates both dimensions. | |
| Integer | totalNbElement () const |
| Total number of elements (dim1Size()*dim2Size()). | |
| Int64 | largeTotalNbElement () const |
| Total number of elements (largeDim1Size()*largeDim2Size()). | |
| MemoryAllocationOptions | allocationOptions () const |
| String | debugName () const |
| Debug name (null if no name specified). | |
| void | setDebugName (const String &name) |
| Sets the array name for debug information. | |
| operator Array2View< T > () | |
| operator ConstArray2View< T > () const | |
| operator Span2< const T > () const | |
| operator Span2< T > () | |
| operator Array2View< T > () | |
| operator ConstArray2View< T > () const | |
| operator Span2< const T > () const | |
| operator Span2< T > () | |
Additional Inherited Members | |
| Protected Types inherited from Arcane::Array2< T > | |
| enum | CloneBehaviour |
| enum | InitBehaviour |
| Protected Member Functions inherited from Arcane::Array2< T > | |
| Array2 (Int64 size1, Int64 size2) | |
| Creates an array of size1 * size2 elements. | |
| Array2 (ConstArray2View< T > rhs) | |
| Array2 (const Span2< const T > &rhs) | |
| Array2 (IMemoryAllocator *allocator) | |
| Creates an empty array with a specific allocator allocator. | |
| Array2 (IMemoryAllocator *allocator, Int64 size1, Int64 size2) | |
| Creates an array of size1 * size2 elements with a specific allocator allocator. | |
| Array2 (Array2< T > &&rhs) | |
| Move constructor. Only valid for UniqueArray2. | |
| void | _resize (Int64 new_size, InitBehaviour rb) |
| Resizes only the first dimension, leaving the second dimension unchanged. | |
| void | _resize (Int64 new_size1, Int64 new_size2, InitBehaviour rb) |
| Reallocates both dimensions. | |
| void | _resizeFromEmpty (Int64 new_size1, Int64 new_size2, InitBehaviour rb) |
| void | _resizeSameDim1ReduceDim2 (Int64 new_size2, InitBehaviour rb) |
| void | _resizeSameDim1IncreaseDim2 (Int64 new_size2, InitBehaviour rb) |
| void | _resize2 (Int64 d1, Int64 d2, InitBehaviour rb) |
| void | _move (Array2< T > &rhs) |
| void | _swap (Array2< T > &rhs) |
| void | _assignFromArray2 (const Array2< T > &rhs) |
| void | _resizeAndCopyView (Span2< const T > rhs) |
| void | _copyMetaData (const Array2< T > &rhs) |
| void | _destroy () |
| void | _initFromAllocator (MemoryAllocationOptions o, Int64 acapacity, void *pre_allocated_buffer=nullptr) |
| Constructs an empty vector with a specific allocator a. | |
| void | _internalDeallocate (RunQueue *queue=nullptr) |
| void | _setMP (TrueImpl *new_mp) |
| void | _setMP2 (TrueImpl *new_mp, ArrayMetaData *new_md) |
| Array2 (Int64 size1, Int64 size2) | |
| Creates an array of size1 * size2 elements. | |
| Array2 (ConstArray2View< T > rhs) | |
| Array2 (const Span2< const T > &rhs) | |
| Array2 (IMemoryAllocator *allocator) | |
| Creates an empty array with a specific allocator allocator. | |
| Array2 (IMemoryAllocator *allocator, Int64 size1, Int64 size2) | |
| Creates an array of size1 * size2 elements with a specific allocator allocator. | |
| Array2 (Array2< T > &&rhs) | |
| Move constructor. Only valid for UniqueArray2. | |
| void | _resize (Int64 new_size, InitBehaviour rb) |
| Resizes only the first dimension, leaving the second dimension unchanged. | |
| void | _resize (Int64 new_size1, Int64 new_size2, InitBehaviour rb) |
| Reallocates both dimensions. | |
| void | _resizeFromEmpty (Int64 new_size1, Int64 new_size2, InitBehaviour rb) |
| void | _resizeSameDim1ReduceDim2 (Int64 new_size2, InitBehaviour rb) |
| void | _resizeSameDim1IncreaseDim2 (Int64 new_size2, InitBehaviour rb) |
| void | _resize2 (Int64 d1, Int64 d2, InitBehaviour rb) |
| void | _move (Array2< T > &rhs) |
| void | _swap (Array2< T > &rhs) |
| void | _assignFromArray2 (const Array2< T > &rhs) |
| void | _resizeAndCopyView (Span2< const T > rhs) |
| void | _copyMetaData (const Array2< T > &rhs) |
| void | _destroy () |
| void | _initFromAllocator (MemoryAllocationOptions o, Int64 acapacity, void *pre_allocated_buffer=nullptr) |
| Constructs an empty vector with a specific allocator a. | |
| void | _internalDeallocate (RunQueue *queue=nullptr) |
| void | _setMP (TrueImpl *new_mp) |
| void | _setMP2 (TrueImpl *new_mp, ArrayMetaData *new_md) |
| Protected Attributes inherited from Arcane::Array2< T > | |
| T * | m_ptr |
| T * | m_ptr |
2D data vector with value semantics (STL style).
This class is the counterpart of UniqueArray for 2D arrays.
Definition at line 727 of file arccore/src/collections/arccore/collections/Array2.h.
| typedef AbstractArray<T> Arcane::UniqueArray2< T >::BaseClassType |
Definition at line 732 of file arccore/src/collections/arccore/collections/Array2.h.
| typedef BaseClassType::ConstReferenceType Arcane::UniqueArray2< T >::ConstReferenceType |
Definition at line 733 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an empty array.
Definition at line 739 of file arccore/src/collections/arccore/collections/Array2.h.
Referenced by Arcane::UniqueArray2< DataType >::clone().
|
inlineexplicit |
Creates an array of size1 * size2 elements.
Definition at line 743 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an array by copying the values from the view.
Definition at line 749 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an array by copying the values from the view.
Definition at line 753 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an array by copying the values of rhs.
Definition at line 757 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an array by copying the values of rhs.
Definition at line 764 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an array by copying the values of rhs.
Definition at line 771 of file arccore/src/collections/arccore/collections/Array2.h.
|
inlineexplicit |
Creates an empty array with a specific allocator allocator.
Definition at line 775 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Creates an array of size1 * size2 elements with a specific allocator allocator.
Definition at line 782 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Move constructor. rhs is invalidated after this call.
Definition at line 786 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Clones the array.
Definition at line 838 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Copies the values of rhs into this instance.
Definition at line 788 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Copies the values of rhs into this instance.
Definition at line 794 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Copies the values of the view rhs into this instance.
Definition at line 812 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Copies the values of rhs into this instance.
Definition at line 800 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Copies the values of the view rhs into this instance.
Definition at line 806 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Move assignment operator. rhs is invalidated after this call.
Definition at line 818 of file arccore/src/collections/arccore/collections/Array2.h.
|
inline |
Swaps the values of v1 and v2.
The swap is done in constant time and without reallocation.
Definition at line 833 of file arccore/src/collections/arccore/collections/Array2.h.
Referenced by Arcane::swap().