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

Modifiable view on a MultiArray2. More...

#include <arcane/utils/MultiArray2View.h>

Collaboration diagram for Arcane::MultiArray2View< DataType >:

Public Member Functions

 MultiArray2View (ArrayView< DataType > buf, ConstArrayView< Int32 > indexes, ConstArrayView< Int32 > sizes)
 View on the array buf.
 MultiArray2View ()=default
 Empty view.
Int32 dim1Size () const
 Number of elements in the first dimension.
ARCANE_DEPRECATED_122 Int32 size () const
 Number of elements in the first dimension.
ConstArrayView< Int32dim2Sizes () const
 Number of elements in the second dimension.
Int32 totalNbElement () const
 Total number of elements in the array.
ArrayView< DataType > operator[] (Int32 i)
 The i-th element of the array.
ConstArrayView< DataType > operator[] (Int32 i) const
 The i-th element of the array.

Private Attributes

ArrayView< DataType > m_buffer
ConstArrayView< Int32m_indexes
ConstArrayView< Int32m_sizes

Detailed Description

template<class DataType>
class Arcane::MultiArray2View< DataType >

Modifiable view on a MultiArray2.

Definition at line 35 of file MultiArray2View.h.

Constructor & Destructor Documentation

◆ MultiArray2View()

template<class DataType>
Arcane::MultiArray2View< DataType >::MultiArray2View ( ArrayView< DataType > buf,
ConstArrayView< Int32 > indexes,
ConstArrayView< Int32 > sizes )
inline

View on the array buf.

Definition at line 40 of file MultiArray2View.h.

Member Function Documentation

◆ dim1Size()

template<class DataType>
Int32 Arcane::MultiArray2View< DataType >::dim1Size ( ) const
inline

Number of elements in the first dimension.

Definition at line 51 of file MultiArray2View.h.

Referenced by size().

Here is the caller graph for this function:

◆ dim2Sizes()

template<class DataType>
ConstArrayView< Int32 > Arcane::MultiArray2View< DataType >::dim2Sizes ( ) const
inline

Number of elements in the second dimension.

Definition at line 60 of file MultiArray2View.h.

◆ operator[]() [1/2]

template<class DataType>
ArrayView< DataType > Arcane::MultiArray2View< DataType >::operator[] ( Int32 i)
inline

The i-th element of the array.

Definition at line 68 of file MultiArray2View.h.

◆ operator[]() [2/2]

template<class DataType>
ConstArrayView< DataType > Arcane::MultiArray2View< DataType >::operator[] ( Int32 i) const
inline

The i-th element of the array.

Definition at line 73 of file MultiArray2View.h.

◆ size()

template<class DataType>
ARCANE_DEPRECATED_122 Int32 Arcane::MultiArray2View< DataType >::size ( ) const
inline

Number of elements in the first dimension.

Deprecated
Use dim1Size() instead.

Definition at line 57 of file MultiArray2View.h.

References dim1Size().

Here is the call graph for this function:

◆ totalNbElement()

template<class DataType>
Int32 Arcane::MultiArray2View< DataType >::totalNbElement ( ) const
inline

Total number of elements in the array.

Definition at line 63 of file MultiArray2View.h.

Member Data Documentation

◆ m_buffer

template<class DataType>
ArrayView<DataType> Arcane::MultiArray2View< DataType >::m_buffer
private

Definition at line 80 of file MultiArray2View.h.

◆ m_indexes

template<class DataType>
ConstArrayView<Int32> Arcane::MultiArray2View< DataType >::m_indexes
private

Definition at line 81 of file MultiArray2View.h.

◆ m_sizes

template<class DataType>
ConstArrayView<Int32> Arcane::MultiArray2View< DataType >::m_sizes
private

Definition at line 82 of file MultiArray2View.h.


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