12#ifndef ARCANE_CORE_MATERIALS_MATVARINDEX_H
13#define ARCANE_CORE_MATERIALS_MATVARINDEX_H
17#include "arcane/core/materials/MaterialsCoreGlobal.h"
42 constexpr ARCCORE_HOST_DEVICE MatVarIndex(
Int32 array_index,
Int32 value_index)
43 : m_array_index(array_index)
44 , m_value_index(value_index)
47 ARCCORE_HOST_DEVICE MatVarIndex() {}
60 m_array_index = array_index;
61 m_value_index = value_index;
65 constexpr ARCCORE_HOST_DEVICE
void reset()
72 constexpr ARCCORE_HOST_DEVICE
bool null()
const
74 return m_value_index == (-1);
78 constexpr ARCCORE_HOST_DEVICE
bool isNull()
const
80 return m_value_index == (-1);
84 constexpr ARCCORE_HOST_DEVICE
friend bool
93 constexpr ARCCORE_HOST_DEVICE
friend bool
100 ARCANE_CORE_EXPORT
friend std::ostream&
119 explicit ARCCORE_HOST_DEVICE PureMatVarIndex(
Int32 idx)
125 Int32 ARCCORE_HOST_DEVICE valueIndex()
const {
return m_index; }
Représente un index sur les variables matériaux et milieux.
constexpr __host__ __device__ friend bool operator==(MatVarIndex mv1, MatVarIndex mv2)
Opérateur de comparaison.
constexpr __host__ __device__ friend bool operator!=(MatVarIndex mv1, MatVarIndex mv2)
Opérateur de comparaison.
constexpr __host__ __device__ Int32 arrayIndex() const
Retourne l'indice du tableau de valeur dans la liste des variables.
constexpr __host__ __device__ bool isNull() const
Indique si l'instance représente l'entité nulle.
constexpr __host__ __device__ void reset()
Positionne l'entité à l'instance nulle.
constexpr __host__ __device__ void setIndex(Int32 array_index, Int32 value_index)
Positionne l'index.
constexpr __host__ __device__ bool null() const
Indique si l'instance représente l'entité nulle.
friend std::ostream & operator<<(std::ostream &o, const MatVarIndex &mvi)
Opérateur d'écriture.
constexpr __host__ __device__ Int32 valueIndex() const
Retourne l'indice dans le tableau de valeur.
Active toujours les traces dans les parties Arcane concernant les matériaux.
std::int32_t Int32
Type entier signé sur 32 bits.