View for a 4D array. More...
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. | |
Private Attributes | |
| DataType * | m_ptr |
| Integer | m_dim1_size |
| Size of the 1st dimension. | |
| Integer | m_dim2_size |
| Size of the 2nd dimension. | |
| Integer | m_dim3_size |
| Size of the 3rd dimension. | |
| Integer | m_dim4_size |
| Size of the 4th dimension. | |
| Integer | m_dim34_size |
| dim3 * dim4 | |
| Integer | m_dim234_size |
| dim2 * dim3 * dim4 | |
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.
References m_dim1_size, m_dim234_size, m_dim2_size, m_dim34_size, m_dim3_size, and m_dim4_size.
|
inlineconstexpr |
Constructs an empty view.
Definition at line 63 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim1_size, m_dim234_size, m_dim2_size, m_dim34_size, m_dim3_size, and m_dim4_size.
|
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.
References m_dim1_size.
|
inlineconstexpr |
Value of the second dimension.
Definition at line 79 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim2_size.
|
inlineconstexpr |
Value of the third dimension.
Definition at line 81 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim3_size.
|
inlineconstexpr |
Value of the fourth dimension.
Definition at line 83 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim4_size.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 100 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim1_size, m_dim234_size, m_dim2_size, m_dim34_size, m_dim3_size, and m_dim4_size.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 112 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim1_size, m_dim234_size, m_dim2_size, m_dim34_size, m_dim3_size, and m_dim4_size.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 106 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim1_size, m_dim234_size, m_dim2_size, m_dim34_size, m_dim3_size, and m_dim4_size.
|
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.
References m_dim1_size, m_dim234_size, m_dim2_size, m_dim34_size, m_dim3_size, and m_dim4_size.
|
inlineconstexpr |
Total number of elements in the array.
Definition at line 85 of file arccore/src/base/arccore/base/Array4View.h.
References m_dim1_size, and m_dim234_size.
|
inlineconstexpr |
Pointer to the first element of the array.
Definition at line 143 of file arccore/src/base/arccore/base/Array4View.h.
|
private |
Size of the 1st dimension.
Definition at line 153 of file arccore/src/base/arccore/base/Array4View.h.
Referenced by Array4View(), Array4View(), dim1Size(), item(), operator()(), operator()(), setItem(), and totalNbElement().
|
private |
dim2 * dim3 * dim4
Definition at line 158 of file arccore/src/base/arccore/base/Array4View.h.
Referenced by Array4View(), Array4View(), item(), operator()(), operator()(), setItem(), and totalNbElement().
|
private |
Size of the 2nd dimension.
Definition at line 154 of file arccore/src/base/arccore/base/Array4View.h.
Referenced by Array4View(), Array4View(), dim2Size(), item(), operator()(), operator()(), and setItem().
|
private |
dim3 * dim4
Definition at line 157 of file arccore/src/base/arccore/base/Array4View.h.
Referenced by Array4View(), Array4View(), item(), operator()(), operator()(), and setItem().
|
private |
Size of the 3rd dimension.
Definition at line 155 of file arccore/src/base/arccore/base/Array4View.h.
Referenced by Array4View(), Array4View(), dim3Size(), item(), operator()(), operator()(), and setItem().
|
private |
Size of the 4th dimension.
Definition at line 156 of file arccore/src/base/arccore/base/Array4View.h.
Referenced by Array4View(), Array4View(), dim4Size(), item(), operator()(), operator()(), and setItem().
|
private |
Definition at line 152 of file arccore/src/base/arccore/base/Array4View.h.