12#ifndef ARCANE_UTILS_MDINDEX_H
13#define ARCANE_UTILS_MDINDEX_H
38template <
int RankValue,
typename IndexType_>
53 constexpr std::array<Int32, RankValue>
operator()()
const {
return m_indexes; }
56 constexpr ARCCORE_HOST_DEVICE Int32
operator[](
int i)
const
62 constexpr ARCCORE_HOST_DEVICE Int64
asInt64(
int i)
const
72 m_indexes[i] +=
rhs[i];
77 std::array<Int32, RankValue> m_indexes = {};
83template <
typename IndexType_>
90 ARCCORE_HOST_DEVICE
constexpr MDIndex(std::array<Int32, 0>
_id)
98template <
typename IndexType_>
103 using BaseClass::m_indexes;
113 ARCCORE_HOST_DEVICE
constexpr MDIndex(std::array<Int32, 1>
_id)
119 ARCCORE_HOST_DEVICE
constexpr Int32 id0()
const {
return m_indexes[0]; }
120 ARCCORE_HOST_DEVICE
constexpr Int64 largeId0()
const {
return m_indexes[0]; }
126template <
typename IndexType_>
131 using BaseClass::m_indexes;
142 ARCCORE_HOST_DEVICE
constexpr MDIndex(std::array<Int32, 2>
_id)
148 ARCCORE_HOST_DEVICE
constexpr Int32 id0()
const {
return m_indexes[0]; }
149 ARCCORE_HOST_DEVICE
constexpr Int32 id1()
const {
return m_indexes[1]; }
150 ARCCORE_HOST_DEVICE
constexpr Int64 largeId0()
const {
return m_indexes[0]; }
151 ARCCORE_HOST_DEVICE
constexpr Int64 largeId1()
const {
return m_indexes[1]; }
157template <
typename IndexType_>
162 using BaseClass::m_indexes;
174 ARCCORE_HOST_DEVICE
constexpr MDIndex(std::array<Int32, 3>
_id)
180 ARCCORE_HOST_DEVICE
constexpr Int32 id0()
const {
return m_indexes[0]; }
181 ARCCORE_HOST_DEVICE
constexpr Int32 id1()
const {
return m_indexes[1]; }
182 ARCCORE_HOST_DEVICE
constexpr Int32 id2()
const {
return m_indexes[2]; }
183 ARCCORE_HOST_DEVICE
constexpr Int64 largeId0()
const {
return m_indexes[0]; }
184 ARCCORE_HOST_DEVICE
constexpr Int64 largeId1()
const {
return m_indexes[1]; }
185 ARCCORE_HOST_DEVICE
constexpr Int64 largeId2()
const {
return m_indexes[2]; }
191template <
typename IndexType_>
196 using BaseClass::m_indexes;
209 ARCCORE_HOST_DEVICE
constexpr MDIndex(std::array<Int32, 4>
_id)
215 ARCCORE_HOST_DEVICE
constexpr Int32 id0()
const {
return m_indexes[0]; }
216 ARCCORE_HOST_DEVICE
constexpr Int32 id1()
const {
return m_indexes[1]; }
217 ARCCORE_HOST_DEVICE
constexpr Int32 id2()
const {
return m_indexes[2]; }
218 ARCCORE_HOST_DEVICE
constexpr Int32 id3()
const {
return m_indexes[3]; }
219 ARCCORE_HOST_DEVICE
constexpr Int64 largeId0()
const {
return m_indexes[0]; }
220 ARCCORE_HOST_DEVICE
constexpr Int64 largeId1()
const {
return m_indexes[1]; }
221 ARCCORE_HOST_DEVICE
constexpr Int64 largeId2()
const {
return m_indexes[2]; }
222 ARCCORE_HOST_DEVICE
constexpr Int64 largeId3()
const {
return m_indexes[3]; }
Déclarations des types utilisés dans Arcane.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Classe de base de la gestion des indices d'un tableau N-dimension.
constexpr ARCCORE_HOST_DEVICE void add(const MDIndexBase< RankValue > &rhs)
Ajoute rhs aux valeurs des indices de l'instance.
constexpr ARCCORE_HOST_DEVICE Int32 operator[](int i) const
Retourne le i-ème indice.
constexpr ARCCORE_HOST_DEVICE Int64 asInt64(int i) const
Retourne le i-ème indice sous la forme d'un Int64.
constexpr std::array< Int32, RankValue > operator()() const
Liste des indices.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-