14#include "arcane/utils/ArrayShape.h"
16#include "arcane/utils/ArgumentException.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/CheckedConvert.h"
41 if (nb_dim < 0 || nb_dim >= MAX_NB_DIMENSION)
53 if (vsize >= MAX_NB_DIMENSION)
54 ARCANE_FATAL(
"Bad size '{0}' for shape. Maximum size is {1}", vsize, MAX_NB_DIMENSION);
55 m_nb_dim = CheckedConvert::toInt32(vsize);
56 for (
Int32 i = 0; i < vsize; ++i)
75 if (s1.m_nb_dim != s2.m_nb_dim)
77 for (
Int32 i = 0; i < s1.m_nb_dim; ++i) {
78 if (s1.m_dims[i] != s2.m_dims[i])
88_print(std::ostream& o)
const
91 for (
Int32 i = 0; i < m_nb_dim; ++i) {
#define ARCANE_THROW(exception_class,...)
Macro for throwing an exception with formatting.
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Exception when an argument is invalid.
void setNbDimension(Int32 nb_value)
Sets the rank of the shape.
void setDimensions(Span< const Int32 > dims)
Sets the number and values of the dimensions.
View of an array of elements of type T.
constexpr view_type smallView()
Constant view of this view.
constexpr __host__ __device__ SizeType size() const noexcept
Returns the size of the array.
View of an array of elements of type T.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.