12#ifndef ARCANE_UTILS_MULTIARRAY2VIEW_H
13#define ARCANE_UTILS_MULTIARRAY2VIEW_H
18#include "arcane/utils/ArrayView.h"
34template <
class DataType>
91template <
class DataType>
152template <
class DataType>
157 friend class MultiArray2<std::remove_cv_t<DataType>>;
168 SmallSpan<const Int32> sizes)
177 constexpr ARCCORE_HOST_DEVICE
Int32 dim1Size()
const {
return m_sizes.size(); }
190 return m_buffer.
subSpan(m_indexes[i], m_sizes[i]);
Declarations of types used in Arcane.
Modifiable view of an array of type T.
Constant view of an array of type T.
ARCANE_DEPRECATED_122 Int32 size() const
Number of elements in the first dimension.
ConstMultiArray2View()=default
Empty view.
Int32 totalNbElement() const
Total number of elements in the array.
Int32 dim1Size() const
Number of elements in the first dimension.
ConstMultiArray2View(ConstArrayView< DataType > buf, ConstArrayView< Int32 > indexes, ConstArrayView< Int32 > sizes)
View on the array buf.
ConstArrayView< Int32 > dim2Sizes() const
Number of elements in the second dimension.
ConstArrayView< DataType > operator[](Int32 i) const
The i-th element of the array.
constexpr __host__ __device__ Int32 totalNbElement() const
Total number of elements in the array.
JaggedSmallSpan()=default
Empty view.
constexpr __host__ __device__ Int32 dim1Size() const
Number of elements in the first dimension.
constexpr __host__ __device__ SmallSpan< DataType > operator[](Int32 i) const
The i-th element of the array.
constexpr __host__ __device__ SmallSpan< const Int32 > dim2Sizes() const
Number of elements in the second dimension.
MultiArray2View(ArrayView< DataType > buf, ConstArrayView< Int32 > indexes, ConstArrayView< Int32 > sizes)
View on the array buf.
ConstArrayView< DataType > operator[](Int32 i) const
The i-th element of the array.
ArrayView< DataType > operator[](Int32 i)
The i-th element of the array.
Int32 totalNbElement() const
Total number of elements in the array.
Int32 dim1Size() const
Number of elements in the first dimension.
ARCANE_DEPRECATED_122 Int32 size() const
Number of elements in the first dimension.
MultiArray2View()=default
Empty view.
ConstArrayView< Int32 > dim2Sizes() const
Number of elements in the second dimension.
Base class for multi-sized 2D arrays.
View of an array of elements of type T.
constexpr __host__ __device__ SmallSpan< T, DynExtent > subSpan(Int32 abegin, Int32 asize) const
Sub-view starting from element abegin and containing asize elements.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.