#include <arcane/utils/ArrayShape.h>
Public Member Functions | |
| ArrayShape (Span< const Int32 > v) | |
| Int32 | nbDimension () const |
| Rank of the shape. | |
| SmallSpan< const Int32 > | dimensions () const |
| Values of each dimension. | |
| Int32 | dimension (Int32 index) const |
| Number of elements in the index-th dimension. | |
| Int64 | totalNbElement () const |
| Total number of elements. | |
| void | setNbDimension (Int32 nb_value) |
| Sets the rank of the shape. | |
| void | setDimension (Int32 index, Int32 value) |
| Sets the value of the index-th dimension to value. | |
| void | setDimensions (Span< const Int32 > dims) |
| Sets the number and values of the dimensions. | |
Static Public Attributes | |
| static constexpr int | MAX_NB_DIMENSION = 8 |
Private Member Functions | |
| void | _set (SmallSpan< const Int32 > v) |
| void | _print (std::ostream &o) const |
Static Private Member Functions | |
| static bool | _isEqual (const ArrayShape &s1, const ArrayShape &s2) |
Private Attributes | |
| Int32 | m_nb_dim = 0 |
| std::array< Int32, MAX_NB_DIMENSION > | m_dims = {} |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const ArrayShape &s) |
| bool | operator== (const ArrayShape &s1, const ArrayShape &s2) |
| bool | operator!= (const ArrayShape &s1, const ArrayShape &s2) |
Array shape.
Definition at line 41 of file ArrayShape.h.
Definition at line 29 of file ArrayShape.cc.
|
staticprivate |
Definition at line 72 of file ArrayShape.cc.
|
private |
Definition at line 87 of file ArrayShape.cc.
Definition at line 49 of file ArrayShape.cc.
Number of elements in the index-th dimension.
Definition at line 59 of file ArrayShape.h.
Values of each dimension.
Definition at line 56 of file ArrayShape.h.
Referenced by Arcane::MeshMDVariableRefBaseT< ItemType, DataType, AddedFirstExtentsType >::updateFromInternal().
|
inline |
Rank of the shape.
Definition at line 53 of file ArrayShape.h.
Sets the value of the index-th dimension to value.
Definition at line 74 of file ArrayShape.h.
Sets the number and values of the dimensions.
Definition at line 63 of file ArrayShape.cc.
References Arcane::SpanImpl< T, SizeType, Extent >::smallView().
| void Arcane::ArrayShape::setNbDimension | ( | Int32 | nb_value | ) |
Sets the rank of the shape.
Definition at line 38 of file ArrayShape.cc.
References ARCANE_THROW.
Referenced by Arcane::MeshMDVariableRefBaseT< ItemType, DataType, AddedFirstExtentsType >::updateFromInternal().
|
inline |
Total number of elements.
Definition at line 62 of file ArrayShape.h.
|
friend |
Definition at line 88 of file ArrayShape.h.
|
friend |
Definition at line 79 of file ArrayShape.h.
|
friend |
Definition at line 84 of file ArrayShape.h.
|
private |
Definition at line 96 of file ArrayShape.h.
|
private |
Definition at line 95 of file ArrayShape.h.
|
staticconstexpr |
Definition at line 45 of file ArrayShape.h.