Arcane  4.2.1.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ > Class Template Reference

Base class for multidimensional views. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/base/arccore/base/MDSpan.h>

Collaboration diagram for Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >:

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

Private Types

using UnqualifiedValueType = std::remove_cv_t<DataType_>
using ThatClass = MDSpan<DataType_, Extents_, LayoutPolicy_>

Private Attributes

DataType * m_ptr = nullptr
ArrayExtentsWithOffsetType m_extents

Static Private Attributes

static constexpr bool IsConst = std::is_const_v<DataType_>

Friends

class NumArray< UnqualifiedValueType, Extents_, LayoutPolicy_ >
class MDSpan< const UnqualifiedValueType, Extents_, LayoutPolicy_ >

Detailed Description

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
class Arcane::MDSpan< DataType_, 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 arcanedoc_core_types_numarray.

Definition at line 42 of file arccore/src/base/arccore/base/MDSpan.h.

Member Typedef Documentation

◆ ArrayBoundsIndexType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ArrayBoundsIndexType = typename Extents::MDIndexType

Definition at line 67 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ArrayExtentsWithOffsetType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ArrayExtentsWithOffsetType = ArrayExtentsWithOffset<Extents, LayoutPolicy>

Definition at line 62 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ConstMDSpanType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
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.

◆ DataType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::DataType = DataType_

Definition at line 53 of file arccore/src/base/arccore/base/MDSpan.h.

◆ DynamicDimsType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::DynamicDimsType = typename Extents::DynamicDimsType

Definition at line 63 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ExtentIndexType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ExtentIndexType = Extents::ExtentIndexType

Definition at line 58 of file arccore/src/base/arccore/base/MDSpan.h.

◆ Extents

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::Extents = Extents_

Definition at line 54 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ExtentsType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ExtentsType = Extents

Definition at line 57 of file arccore/src/base/arccore/base/MDSpan.h.

◆ IndexType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::IndexType = typename Extents::MDIndexType

Definition at line 68 of file arccore/src/base/arccore/base/MDSpan.h.

◆ LayoutPolicy

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::LayoutPolicy = LayoutPolicy_

Definition at line 55 of file arccore/src/base/arccore/base/MDSpan.h.

◆ LayoutPolicyType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::LayoutPolicyType = LayoutPolicy

Definition at line 59 of file arccore/src/base/arccore/base/MDSpan.h.

◆ LoopIndexType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::LoopIndexType = MDIndexType

Definition at line 61 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDIndexType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDIndexType = typename Extents::MDIndexType

Definition at line 60 of file arccore/src/base/arccore/base/MDSpan.h.

◆ RemovedFirstExtentsType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::RemovedFirstExtentsType = typename Extents::RemovedFirstExtentsType

Definition at line 64 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ThatClass

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ThatClass = MDSpan<DataType_, Extents_, LayoutPolicy_>
private

Definition at line 48 of file arccore/src/base/arccore/base/MDSpan.h.

◆ UnqualifiedValueType

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::UnqualifiedValueType = std::remove_cv_t<DataType_>
private

Definition at line 44 of file arccore/src/base/arccore/base/MDSpan.h.

◆ value_type

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
using Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::value_type = DataType

Definition at line 56 of file arccore/src/base/arccore/base/MDSpan.h.

Constructor & Destructor Documentation

◆ MDSpan() [1/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( DataType * ptr,
ArrayExtentsWithOffsetType extents )
inlineconstexprnoexcept

Definition at line 74 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan() [2/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( DataType * ptr,
const DynamicDimsType & dims )
inlineconstexprnoexcept

Definition at line 79 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan() [3/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( const MDSpan< UnqualifiedValueType, Extents, LayoutPolicy > & rhs)
inlineconstexprnoexcept

Definition at line 83 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan() [4/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( SmallSpan< DataType > v)
inlineconstexprnoexcept

Definition at line 88 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan() [5/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( ArrayView< UnqualifiedValueType > v)
inlineconstexprnoexcept

Definition at line 93 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan() [6/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( SmallSpan< UnqualifiedValueType > v)
inlineconstexprnoexcept

Definition at line 98 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan() [7/7]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::MDSpan ( ConstArrayView< UnqualifiedValueType > v)
inlineconstexprnoexcept

Definition at line 103 of file arccore/src/base/arccore/base/MDSpan.h.

Member Function Documentation

◆ _internalData() [1/2]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::_internalData ( )
inlineconstexpr

Definition at line 148 of file arccore/src/base/arccore/base/MDSpan.h.

◆ _internalData() [2/2]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
const DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::_internalData ( ) const
inlineconstexpr

Definition at line 149 of file arccore/src/base/arccore/base/MDSpan.h.

◆ constMDSpan()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
MDSpan< const DataType, Extents, LayoutPolicy > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::constMDSpan ( ) const
inlineconstexpr

Definition at line 311 of file arccore/src/base/arccore/base/MDSpan.h.

◆ constSpan()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
MDSpan< const DataType, Extents, LayoutPolicy > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::constSpan ( ) const
inlineconstexpr

Definition at line 306 of file arccore/src/base/arccore/base/MDSpan.h.

◆ data() [1/2]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
const DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::data ( ) const
inlineconstexprnoexcept

Base pointer for allocated memory.

Definition at line 144 of file arccore/src/base/arccore/base/MDSpan.h.

◆ data() [2/2]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::data ( )
inlineconstexprnoexcept

Base pointer for allocated memory.

Definition at line 142 of file arccore/src/base/arccore/base/MDSpan.h.

◆ extent0()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ExtentIndexType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::extent0 ( ) const
inlineconstexpr

Value of the first dimension.

Definition at line 165 of file arccore/src/base/arccore/base/MDSpan.h.

◆ extent1()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ExtentIndexType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::extent1 ( ) const
inlineconstexpr

Value of the second dimension.

Definition at line 167 of file arccore/src/base/arccore/base/MDSpan.h.

◆ extent2()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ExtentIndexType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::extent2 ( ) const
inlineconstexpr

Value of the third dimension.

Definition at line 169 of file arccore/src/base/arccore/base/MDSpan.h.

◆ extent3()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ExtentIndexType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::extent3 ( ) const
inlineconstexpr

Value of the fourth dimension.

Definition at line 171 of file arccore/src/base/arccore/base/MDSpan.h.

◆ extents()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ArrayExtents< Extents > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::extents ( ) const
inline

Definition at line 153 of file arccore/src/base/arccore/base/MDSpan.h.

◆ extentsWithOffset()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ArrayExtentsWithOffsetType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::extentsWithOffset ( ) const
inline

Definition at line 157 of file arccore/src/base/arccore/base/MDSpan.h.

◆ offset() [1/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Int64 Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::offset ( ExtentIndexType i) const
inlineconstexpr

Value for element i.

Definition at line 196 of file arccore/src/base/arccore/base/MDSpan.h.

◆ offset() [2/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Int64 Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::offset ( ExtentIndexType i,
ExtentIndexType j ) const
inlineconstexpr

Value for element i,j.

Definition at line 190 of file arccore/src/base/arccore/base/MDSpan.h.

◆ offset() [3/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Int64 Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::offset ( ExtentIndexType i,
ExtentIndexType j,
ExtentIndexType k ) const
inlineconstexpr

Value for element i,j,k.

Definition at line 183 of file arccore/src/base/arccore/base/MDSpan.h.

◆ offset() [4/5]

◆ offset() [5/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Int64 Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::offset ( MDIndexType idx) const
inlineconstexpr

Value for element idx.

Definition at line 200 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator()() [1/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator() ( ExtentIndexType i) const
inlineconstexpr

Value for element i.

Definition at line 227 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator()() [2/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator() ( ExtentIndexType i,
ExtentIndexType j ) const
inlineconstexpr

Value for element i,j.

Definition at line 221 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator()() [3/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator() ( ExtentIndexType i,
ExtentIndexType j,
ExtentIndexType k ) const
inlineconstexpr

Value for element i,j,k.

Definition at line 215 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator()() [4/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator() ( ExtentIndexType i,
ExtentIndexType j,
ExtentIndexType k,
ExtentIndexType l ) const
inlineconstexpr

Value for element i,j,k,l.

Definition at line 208 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator()() [5/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator() ( MDIndexType idx) const
inlineconstexpr

Value for element idx.

Definition at line 240 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator=() [1/4]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ThatClass & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator= ( ArrayView< UnqualifiedValueType > v)
inlineconstexprnoexcept

Definition at line 122 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator=() [2/4]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ThatClass & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator= ( ConstArrayView< UnqualifiedValueType > v)
inlineconstexprnoexcept

Definition at line 129 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator=() [3/4]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ThatClass & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator= ( SmallSpan< DataType > v)
inlineconstexprnoexcept

Definition at line 108 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator=() [4/4]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ThatClass & Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator= ( SmallSpan< UnqualifiedValueType > v)
inlineconstexprnoexcept

Definition at line 115 of file arccore/src/base/arccore/base/MDSpan.h.

◆ operator[]()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::operator[] ( ExtentIndexType i) const
inlineconstexpr

Value for element i.

Definition at line 233 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ptrAt() [1/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ptrAt ( ExtentIndexType i) const
inlineconstexpr

Pointer to the value for element i.

Definition at line 268 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ptrAt() [2/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ptrAt ( ExtentIndexType i,
ExtentIndexType j ) const
inlineconstexpr

Pointer to the value for element i,j.

Definition at line 262 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ptrAt() [3/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ptrAt ( ExtentIndexType i,
ExtentIndexType j,
ExtentIndexType k ) const
inlineconstexpr

Pointer to the value for element i,j,k.

Definition at line 255 of file arccore/src/base/arccore/base/MDSpan.h.

◆ ptrAt() [4/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ptrAt ( ExtentIndexType i,
ExtentIndexType j,
ExtentIndexType k,
ExtentIndexType l ) const
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< DataType, AddedFirstExtentsType, RightLayout >::slice().

Here is the caller graph for this function:

◆ ptrAt() [5/5]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType * Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::ptrAt ( MDIndexType idx) const
inlineconstexpr

Pointer to the value for element i.

Definition at line 275 of file arccore/src/base/arccore/base/MDSpan.h.

◆ slice()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
__host__ __device__ MDSpan< DataType, RemovedFirstExtentsType, LayoutPolicy > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::slice ( ExtentIndexType i) const
inline

Returns a dimension (N-1) view starting from index element i.

For example:

MDSpan<Real, MDDim3> span3 = ...;
MDSpan<Real, MDDim2> sliced_span = span3.slice(5);
// sliced_span(i,i) <=> span3(5,i,j);
__host__ __device__ MDSpan< DataType, RemovedFirstExtentsType, LayoutPolicy > slice(ExtentIndexType i) const
Returns a dimension (N-1) view starting from index element i.
Warning
This is only valid if LayoutPolicy is RightLayout.

Definition at line 295 of file arccore/src/base/arccore/base/MDSpan.h.

◆ to1DConstSmallSpan()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
SmallSpan< const DataType > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::to1DConstSmallSpan ( ) const
inlineconstexpr

Definition at line 330 of file arccore/src/base/arccore/base/MDSpan.h.

◆ to1DSmallSpan() [1/2]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
SmallSpan< DataType > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::to1DSmallSpan ( )
inlineconstexpr

Definition at line 321 of file arccore/src/base/arccore/base/MDSpan.h.

◆ to1DSmallSpan() [2/2]

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
SmallSpan< const DataType > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::to1DSmallSpan ( ) const
inlineconstexpr

Definition at line 326 of file arccore/src/base/arccore/base/MDSpan.h.

◆ to1DSpan()

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
Span< DataType > Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::to1DSpan ( ) const
inlineconstexpr

Definition at line 316 of file arccore/src/base/arccore/base/MDSpan.h.

◆ MDSpan< const UnqualifiedValueType, Extents_, LayoutPolicy_ >

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
friend class MDSpan< const UnqualifiedValueType, Extents_, LayoutPolicy_ >
friend

Definition at line 1 of file arccore/src/base/arccore/base/MDSpan.h.

◆ NumArray< UnqualifiedValueType, Extents_, LayoutPolicy_ >

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
friend class NumArray< UnqualifiedValueType, Extents_, LayoutPolicy_ >
friend

Definition at line 1 of file arccore/src/base/arccore/base/MDSpan.h.

Member Data Documentation

◆ IsConst

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
bool Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::IsConst = std::is_const_v<DataType_>
staticconstexprprivate

Definition at line 49 of file arccore/src/base/arccore/base/MDSpan.h.

◆ m_extents

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
ArrayExtentsWithOffsetType Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::m_extents
private

Definition at line 339 of file arccore/src/base/arccore/base/MDSpan.h.

◆ m_ptr

template<typename DataType_, typename Extents_, typename LayoutPolicy_>
DataType* Arcane::MDSpan< DataType_, Extents_, LayoutPolicy_ >::m_ptr = nullptr
private

Definition at line 338 of file arccore/src/base/arccore/base/MDSpan.h.


The documentation for this class was generated from the following files: