Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::JaggedSmallSpan< DataType > Class Template Reference

View on a MultiArray2. More...

#include <arcane/utils/MultiArray2View.h>

Collaboration diagram for Arcane::JaggedSmallSpan< DataType >:

Public Member Functions

 JaggedSmallSpan ()=default
 Empty view.
constexpr __host__ __device__ Int32 dim1Size () const
 Number of elements in the first dimension.
constexpr __host__ __device__ SmallSpan< const Int32dim2Sizes () const
 Number of elements in the second dimension.
constexpr __host__ __device__ Int32 totalNbElement () const
 Total number of elements in the array.
constexpr __host__ __device__ SmallSpan< DataType > operator[] (Int32 i) const
 The i-th element of the array.

Private Member Functions

 JaggedSmallSpan (SmallSpan< DataType > buf, SmallSpan< const Int32 > indexes, SmallSpan< const Int32 > sizes)
 View on the array buf.

Private Attributes

SmallSpan< DataType > m_buffer
SmallSpan< const Int32m_indexes
SmallSpan< const Int32m_sizes

Friends

class MultiArray2< std::remove_cv_t< DataType > >

Detailed Description

template<class DataType>
class Arcane::JaggedSmallSpan< DataType >

View on a MultiArray2.

Instances of this class are created by calling MultiArray2::span() or MultiArray2::constSpan().

Definition at line 153 of file MultiArray2View.h.

Constructor & Destructor Documentation

◆ JaggedSmallSpan()

template<class DataType>
Arcane::JaggedSmallSpan< DataType >::JaggedSmallSpan ( SmallSpan< DataType > buf,
SmallSpan< const Int32 > indexes,
SmallSpan< const Int32 > sizes )
inlineprivate

View on the array buf.

Definition at line 167 of file MultiArray2View.h.

References JaggedSmallSpan().

Here is the call graph for this function:

Member Function Documentation

◆ dim1Size()

template<class DataType>
__host__ __device__ Int32 Arcane::JaggedSmallSpan< DataType >::dim1Size ( ) const
inlineconstexpr

Number of elements in the first dimension.

Definition at line 177 of file MultiArray2View.h.

◆ dim2Sizes()

template<class DataType>
__host__ __device__ SmallSpan< const Int32 > Arcane::JaggedSmallSpan< DataType >::dim2Sizes ( ) const
inlineconstexpr

Number of elements in the second dimension.

Definition at line 180 of file MultiArray2View.h.

◆ operator[]()

template<class DataType>
__host__ __device__ SmallSpan< DataType > Arcane::JaggedSmallSpan< DataType >::operator[] ( Int32 i) const
inlineconstexpr

The i-th element of the array.

Definition at line 188 of file MultiArray2View.h.

References Arcane::SmallSpan< T, Extent >::subSpan().

Here is the call graph for this function:

◆ totalNbElement()

template<class DataType>
__host__ __device__ Int32 Arcane::JaggedSmallSpan< DataType >::totalNbElement ( ) const
inlineconstexpr

Total number of elements in the array.

Definition at line 183 of file MultiArray2View.h.

◆ MultiArray2< std::remove_cv_t< DataType > >

template<class DataType>
friend class MultiArray2< std::remove_cv_t< DataType > >
friend

Definition at line 140 of file MultiArray2View.h.

Member Data Documentation

◆ m_buffer

template<class DataType>
SmallSpan<DataType> Arcane::JaggedSmallSpan< DataType >::m_buffer
private

Definition at line 195 of file MultiArray2View.h.

◆ m_indexes

template<class DataType>
SmallSpan<const Int32> Arcane::JaggedSmallSpan< DataType >::m_indexes
private

Definition at line 196 of file MultiArray2View.h.

◆ m_sizes

template<class DataType>
SmallSpan<const Int32> Arcane::JaggedSmallSpan< DataType >::m_sizes
private

Definition at line 197 of file MultiArray2View.h.


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