View for a 4D array. More...
#include <arccore/base/Array4View.h>
Public Member Functions | |
| constexpr | Array4View (DataType *ptr, Integer dim1_size, Integer dim2_size, Integer dim3_size, Integer dim4_size) |
| Constructs a view. | |
| constexpr | Array4View () |
| Constructs an empty view. | |
| constexpr Integer | dim1Size () const |
| Value of the first dimension. | |
| constexpr Integer | dim2Size () const |
| Value of the second dimension. | |
| constexpr Integer | dim3Size () const |
| Value of the third dimension. | |
| constexpr Integer | dim4Size () const |
| Value of the fourth dimension. | |
| constexpr Integer | totalNbElement () const |
| Total number of elements in the array. | |
| constexpr Array3View< DataType > | operator[] (Integer i) |
| constexpr ConstArray3View< DataType > | operator[] (Integer i) const |
| constexpr DataType | item (Integer i, Integer j, Integer k, Integer l) const |
| Value for element i,j,k,l. | |
| constexpr const DataType & | operator() (Integer i, Integer j, Integer k, Integer l) const |
| Value for element i,j,k,l. | |
| constexpr DataType & | operator() (Integer i, Integer j, Integer k, Integer l) |
| Value for element i,j,k,l. | |
| constexpr void | setItem (Integer i, Integer j, Integer k, Integer l, const DataType &value) |
| Sets the value for element i,j,k,l. | |
| constexpr DataType * | unguardedBasePointer () |
| Pointer to the first element of the array. | |
| constexpr DataType * | data () |
| Pointer to the first element of the array. | |
View for a 4D array.
This class allows obtaining a 4D view from a contiguous memory area, such as the one obtained via the Array class.
The view can be used like a classic C array, for example:
However, it is preferable to directly use the item() or setItem() methods (or the operator()) to access an element of the array for reading or writing.
Definition at line 46 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Constructs a view.
Definition at line 51 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Constructs an empty view.
Definition at line 63 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Pointer to the first element of the array.
Definition at line 148 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value of the first dimension.
Definition at line 77 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value of the second dimension.
Definition at line 79 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value of the third dimension.
Definition at line 81 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value of the fourth dimension.
Definition at line 83 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 100 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 112 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 106 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Definition at line 89 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Definition at line 94 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Sets the value for element i,j,k,l.
Definition at line 132 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Total number of elements in the array.
Definition at line 85 of file arccore/src/base/arccore/base/Array4View.h.
|
inlineconstexpr |
Pointer to the first element of the array.
Definition at line 143 of file arccore/src/base/arccore/base/Array4View.h.