Base class for multidimensional views. More...
#include <arccore/base/MDSpan.h>
Public Types | |
| using | DataType = DataType_ |
| using | Extents = Extents_ |
| using | LayoutPolicy = LayoutPolicy_ |
| using | value_type = DataType |
| using | ExtentsType = Extents |
| using | ExtentIndexType = Extents::ExtentIndexType |
| using | LayoutPolicyType = LayoutPolicy |
| using | MDIndexType = typename Extents::MDIndexType |
| using | LoopIndexType = MDIndexType |
| using | ArrayExtentsWithOffsetType = ArrayExtentsWithOffset<Extents, LayoutPolicy> |
| using | DynamicDimsType = typename Extents::DynamicDimsType |
| using | RemovedFirstExtentsType = typename Extents::RemovedFirstExtentsType |
| using | ConstMDSpanType = MDSpan<const DataType, Extents, LayoutPolicy> |
| using | ArrayBoundsIndexType = typename Extents::MDIndexType |
| using | IndexType = typename Extents::MDIndexType |
Public Member Functions | |
| constexpr | MDSpan (DataType *ptr, ArrayExtentsWithOffsetType extents) noexcept |
| constexpr | MDSpan (DataType *ptr, const DynamicDimsType &dims) noexcept |
| constexpr | MDSpan (const MDSpan< UnqualifiedValueType, Extents, LayoutPolicy > &rhs) noexcept |
| MDSpan (const MDSpan< DataType, Extents, LayoutPolicy > &rhs)=default | |
| constexpr | MDSpan (SmallSpan< DataType > v) noexcept |
| constexpr | MDSpan (ArrayView< UnqualifiedValueType > v) noexcept |
| constexpr | MDSpan (SmallSpan< UnqualifiedValueType > v) noexcept |
| constexpr | MDSpan (ConstArrayView< UnqualifiedValueType > v) noexcept |
| constexpr ThatClass & | operator= (SmallSpan< DataType > v) noexcept |
| constexpr ThatClass & | operator= (SmallSpan< UnqualifiedValueType > v) noexcept |
| constexpr ThatClass & | operator= (ArrayView< UnqualifiedValueType > v) noexcept |
| constexpr ThatClass & | operator= (ConstArrayView< UnqualifiedValueType > v) noexcept |
| MDSpan & | operator= (const MDSpan &v)=default |
| MDSpan & | operator= (MDSpan &&v) noexcept=default |
| constexpr DataType * | data () noexcept |
| Base pointer for allocated memory. | |
| constexpr const DataType * | data () const noexcept |
| Base pointer for allocated memory. | |
| constexpr DataType * | _internalData () |
| constexpr const DataType * | _internalData () const |
| ArrayExtents< Extents > | extents () const |
| ArrayExtentsWithOffsetType | extentsWithOffset () const |
| constexpr ExtentIndexType | extent0 () const |
| Value of the first dimension. | |
| constexpr ExtentIndexType | extent1 () const |
| Value of the second dimension. | |
| constexpr ExtentIndexType | extent2 () const |
| Value of the third dimension. | |
| constexpr ExtentIndexType | extent3 () const |
| Value of the fourth dimension. | |
| constexpr Int64 | offset (ExtentIndexType i, ExtentIndexType j, ExtentIndexType k, ExtentIndexType l) const |
| Value for element i,j,k,l. | |
| constexpr Int64 | offset (ExtentIndexType i, ExtentIndexType j, ExtentIndexType k) const |
| Value for element i,j,k. | |
| constexpr Int64 | offset (ExtentIndexType i, ExtentIndexType j) const |
| Value for element i,j. | |
| constexpr Int64 | offset (ExtentIndexType i) const |
| Value for element i. | |
| constexpr Int64 | offset (MDIndexType idx) const |
| Value for element idx. | |
| constexpr DataType & | operator() (ExtentIndexType i, ExtentIndexType j, ExtentIndexType k, ExtentIndexType l) const |
| Value for element i,j,k,l. | |
| constexpr DataType & | operator() (ExtentIndexType i, ExtentIndexType j, ExtentIndexType k) const |
| Value for element i,j,k. | |
| constexpr DataType & | operator() (ExtentIndexType i, ExtentIndexType j) const |
| Value for element i,j. | |
| constexpr DataType & | operator() (ExtentIndexType i) const |
| Value for element i. | |
| constexpr DataType | operator[] (ExtentIndexType i) const |
| Value for element i. | |
| constexpr DataType & | operator() (MDIndexType idx) const |
| Value for element idx. | |
| constexpr DataType * | ptrAt (ExtentIndexType i, ExtentIndexType j, ExtentIndexType k, ExtentIndexType l) const |
| Pointer to the value for element i,j,k,l. | |
| constexpr DataType * | ptrAt (ExtentIndexType i, ExtentIndexType j, ExtentIndexType k) const |
| Pointer to the value for element i,j,k. | |
| constexpr DataType * | ptrAt (ExtentIndexType i, ExtentIndexType j) const |
| Pointer to the value for element i,j. | |
| constexpr DataType * | ptrAt (ExtentIndexType i) const |
| Pointer to the value for element i. | |
| constexpr DataType * | ptrAt (MDIndexType idx) const |
| Pointer to the value for element i. | |
| __host__ __device__ MDSpan< DataType, RemovedFirstExtentsType, LayoutPolicy > | slice (ExtentIndexType i) const |
| Returns a dimension (N-1) view starting from index element i. | |
| constexpr MDSpan< const DataType, Extents, LayoutPolicy > | constSpan () const |
| constexpr MDSpan< const DataType, Extents, LayoutPolicy > | constMDSpan () const |
| constexpr Span< DataType > | to1DSpan () const |
| constexpr SmallSpan< DataType > | to1DSmallSpan () |
| constexpr SmallSpan< const DataType > | to1DSmallSpan () const |
| constexpr SmallSpan< const DataType > | to1DConstSmallSpan () const |
Friends | |
| class | NumArray< UnqualifiedValueType, Extents_, LayoutPolicy_ > |
| class | MDSpan< const UnqualifiedValueType, Extents_, LayoutPolicy_ > |
Base class for multidimensional views.
This class is inspired by the std::mdspan class currently being defined (see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0009r12.html)
This class is used to manage views on arrays such as NumArray. The methods of this class are accessible on the accelerator.
For more information, refer to the page Usage of the NumArray class.
Definition at line 42 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ArrayBoundsIndexType = typename Extents::MDIndexType |
Definition at line 67 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ArrayExtentsWithOffsetType = ArrayExtentsWithOffset<Extents, LayoutPolicy> |
Definition at line 62 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ConstMDSpanType = MDSpan<const DataType, Extents, LayoutPolicy> |
Definition at line 65 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::DataType = DataType_ |
Definition at line 53 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::DynamicDimsType = typename Extents::DynamicDimsType |
Definition at line 63 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ExtentIndexType = Extents::ExtentIndexType |
Definition at line 58 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::Extents = Extents_ |
Definition at line 54 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ExtentsType = Extents |
Definition at line 57 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::IndexType = typename Extents::MDIndexType |
Definition at line 68 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::LayoutPolicy = LayoutPolicy_ |
Definition at line 55 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::LayoutPolicyType = LayoutPolicy |
Definition at line 59 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::LoopIndexType = MDIndexType |
Definition at line 61 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDIndexType = typename Extents::MDIndexType |
Definition at line 60 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::RemovedFirstExtentsType = typename Extents::RemovedFirstExtentsType |
Definition at line 64 of file arccore/src/base/arccore/base/MDSpan.h.
| using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::value_type = DataType |
Definition at line 56 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 74 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 79 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 83 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 88 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 93 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 98 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 103 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 148 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 149 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 311 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 306 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Base pointer for allocated memory.
Definition at line 144 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Base pointer for allocated memory.
Definition at line 142 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value of the first dimension.
Definition at line 165 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value of the second dimension.
Definition at line 167 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value of the third dimension.
Definition at line 169 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value of the fourth dimension.
Definition at line 171 of file arccore/src/base/arccore/base/MDSpan.h.
|
inline |
Definition at line 153 of file arccore/src/base/arccore/base/MDSpan.h.
|
inline |
Definition at line 157 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i.
Definition at line 196 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i,j.
Definition at line 190 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i,j,k.
Definition at line 183 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 176 of file arccore/src/base/arccore/base/MDSpan.h.
Referenced by Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::operator()(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::operator()(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::operator()(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::operator()(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::operator()(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::operator[](), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::ptrAt(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::ptrAt(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::ptrAt(), Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::ptrAt(), and Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::ptrAt().
|
inlineconstexpr |
Value for element idx.
Definition at line 200 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i.
Definition at line 227 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i,j.
Definition at line 221 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i,j,k.
Definition at line 215 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i,j,k,l.
Definition at line 208 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element idx.
Definition at line 240 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 122 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 129 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 108 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexprnoexcept |
Definition at line 115 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Value for element i.
Definition at line 233 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Pointer to the value for element i.
Definition at line 268 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Pointer to the value for element i,j.
Definition at line 262 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Pointer to the value for element i,j,k.
Definition at line 255 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Pointer to the value for element i,j,k,l.
Definition at line 248 of file arccore/src/base/arccore/base/MDSpan.h.
Referenced by Arcane::MDSpan< NumMatrixType, AddedFirstExtentsType, RightLayout >::slice().
|
inlineconstexpr |
Pointer to the value for element i.
Definition at line 275 of file arccore/src/base/arccore/base/MDSpan.h.
|
inline |
Returns a dimension (N-1) view starting from index element i.
For example:
Definition at line 295 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 330 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 321 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 326 of file arccore/src/base/arccore/base/MDSpan.h.
|
inlineconstexpr |
Definition at line 316 of file arccore/src/base/arccore/base/MDSpan.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/MDSpan.h.
|
friend |
Definition at line 1 of file arccore/src/base/arccore/base/MDSpan.h.