Mutable view for a 2D array. More...
Public Member Functions | |
| constexpr | Array2View (DataType *ptr, Integer dim1_size, Integer dim2_size) |
| Creates a 2D view of dimension [dim1_size][dim2_size]. | |
| Array2View ()=default | |
| Creates an empty 2D view. | |
| constexpr Integer | dim1Size () const |
| Number of elements in the first dimension. | |
| constexpr Integer | dim2Size () const |
| Number of elements in the second dimension. | |
| constexpr Integer | totalNbElement () const |
| Total number of elements. | |
| constexpr ArrayView< DataType > | operator[] (Integer i) |
| constexpr ConstArrayView< DataType > | operator[] (Integer i) const |
| constexpr DataType | item (Integer i, Integer j) const |
| Value of element [i][j]. | |
| constexpr DataType | setItem (Integer i, Integer j, const DataType &value) |
| Positions element [i][j] to value. | |
| constexpr const DataType | operator() (Integer i, Integer j) const |
| Value of element [i][j]. | |
| constexpr DataType & | operator() (Integer i, Integer j) |
| Value of element [i][j]. | |
| constexpr DataType * | unguardedBasePointer () |
| Pointer to the allocated memory. | |
| constexpr DataType * | data () |
| Pointer to the allocated memory. | |
| constexpr const DataType * | unguardedBasePointer () const |
| Read-only pointer to the allocated memory. | |
| constexpr const DataType * | data () const |
| Read-only pointer to the allocated memory. | |
Private Attributes | |
| DataType * | m_ptr = nullptr |
| Integer | m_dim1_size = 0 |
| Integer | m_dim2_size = 0 |
Friends | |
| class | SmallSpan2< DataType > |
| class | SmallSpan2< const DataType > |
| class | Span2< DataType > |
| class | Span2< const DataType > |
| class | ConstArray2View< DataType > |
Mutable view for a 2D array.
Like any view, an instance of this class is only valid as long as the container it originates from does not change its number of elements.
Definition at line 37 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Creates a 2D view of dimension [dim1_size][dim2_size].
Definition at line 51 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Pointer to the allocated memory.
Definition at line 125 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Read-only pointer to the allocated memory.
Definition at line 131 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Number of elements in the first dimension.
Definition at line 62 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Number of elements in the second dimension.
Definition at line 64 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Value of element [i][j].
Definition at line 81 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Value of element [i][j].
Definition at line 99 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Value of element [i][j].
Definition at line 93 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Definition at line 70 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Definition at line 75 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Positions element [i][j] to value.
Definition at line 87 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Total number of elements.
Definition at line 66 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Pointer to the allocated memory.
Definition at line 122 of file arccore/src/base/arccore/base/Array2View.h.
|
inlineconstexpr |
Read-only pointer to the allocated memory.
Definition at line 128 of file arccore/src/base/arccore/base/Array2View.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/Array2View.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/Array2View.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/Array2View.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/Array2View.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/Array2View.h.
|
private |
Definition at line 136 of file arccore/src/base/arccore/base/Array2View.h.
|
private |
Definition at line 137 of file arccore/src/base/arccore/base/Array2View.h.
|
private |
Definition at line 135 of file arccore/src/base/arccore/base/Array2View.h.