14#include "arcane/utils/String.h"
15#include "arcane/utils/ArrayView.h"
16#include "arcane/utils/Iostream.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/TraceInfo.h"
19#include "arcane/utils/NumericTypes.h"
20#include "arcane/utils/ArgumentException.h"
21#include "arcane/utils/PlatformUtils.h"
22#include "arcane/utils/Array.h"
24#include "arcane/core/datatype/DataTypeTraits.h"
44 const char* N_ALL_NAMES[NB_ARCANE_DATA_TYPE] = {
45 DataTypeNames::N_BYTE, DataTypeNames::N_REAL,
46 DataTypeNames::N_INT16, DataTypeNames::N_INT32, DataTypeNames::N_INT64,
47 DataTypeNames::N_STRING,
48 DataTypeNames::N_REAL2, DataTypeNames::N_REAL3, DataTypeNames::N_REAL2x2, DataTypeNames::N_REAL3x3,
49 DataTypeNames::N_BFLOAT16, DataTypeNames::N_FLOAT16, DataTypeNames::N_FLOAT32,
50 DataTypeNames::N_INT8, DataTypeNames::N_FLOAT128, DataTypeNames::N_INT128,
51 DataTypeNames::N_UNKNOWN
55 int ALL_SIZEOF[NB_ARCANE_DATA_TYPE] = {
69extern "C++" const char*
73 if (v >= NB_ARCANE_DATA_TYPE)
75 return N_ALL_NAMES[v];
81extern "C++" std::ostream&
91extern "C++" ARCANE_DATATYPE_EXPORT
eDataType
95 std::string_view buf(name);
96 for (
int i = 0; i < NB_ARCANE_DATA_TYPE; ++i) {
97 if (buf == std::string_view(N_ALL_NAMES[i])) {
108extern "C++" ARCANE_DATATYPE_EXPORT
Integer
113 const Int32 v = type;
114 if (v >= NB_ARCANE_DATA_TYPE)
116 return ALL_SIZEOF[v];
123extern "C++" ARCANE_DATATYPE_EXPORT
eDataType
126 bool has_error =
true;
136extern "C++" std::istream&
141 bool has_error =
true;
145 istr.setstate(std::ios_base::failbit);
155extern "C++" ARCANE_CORE_EXPORT
void
158 global_data_initialisation_policy = init_policy;
164 return global_data_initialisation_policy;
174 return std::numeric_limits<Real>::signaling_NaN();
181template <
typename Type>
static void
186 for (
Integer i = 0; i < n; ++i)
226template<
typename Type>
static void
231 for (
Integer i = 0; i < n; ++i)
295 return Real3::zero();
307 return Real2::null();
#define ARCANE_THROW(exception_class,...)
Macro pour envoyer une exception avec formattage.
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Fichier contenant les définitions des types de données gérés par Arcane.
Exception lorsqu'un argument est invalide.
Vue modifiable d'un tableau d'un type T.
constexpr const_pointer data() const noexcept
Pointeur sur le début de la vue.
constexpr Integer size() const noexcept
Retourne la taille du tableau.
Type flottant sur 128 bits.
Type flottant demi-précision.
Type entier sur 128 bits.
Classe gérant un vecteur de réel de dimension 2.
Classe gérant une matrice de réel de dimension 2x2.
constexpr __host__ static __device__ Real2x2 null()
Construit la matrice nulle.
Classe gérant un vecteur de réel de dimension 3.
Classe gérant une matrice de réel de dimension 3x3.
constexpr __host__ static __device__ Real3x3 zero()
Construit la matrice nulle.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int8_t Int8
Type entier signé sur 8 bits.
ARCANE_DATATYPE_EXPORT Integer dataTypeSize(eDataType type)
Taille du type de donnée type (qui doit être différent de DT_String)
void setGlobalDataInitialisationPolicy(eDataInitialisationPolicy init_policy)
Positionne la politique d'initialisation des variables.
eDataInitialisationPolicy
Type de politique d'initialisation possible pour une donnée.
@ DIP_Legacy
Initialisation en mode historique.
std::int64_t Int64
Type entier signé sur 64 bits.
eDataInitialisationPolicy getGlobalDataInitialisationPolicy()
Récupère la politique d'initialisation des variables.
Int32 Integer
Type représentant un entier.
std::istream & operator>>(std::istream &istr, eItemKind &item_kind)
Opérateur d'entrée depuis un flot.
std::int16_t Int16
Type entier signé sur 16 bits.
double Real
Type représentant un réel.
unsigned char Byte
Type d'un octet.
float Float32
Type flottant IEEE-753 simple précision.
eDataType
Type d'une donnée.
@ DT_Unknown
Donnée de type inconnue ou non initialisée.
@ DT_String
Donnée de type chaîne de caractère UTF-8.
std::ostream & operator<<(std::ostream &ostr, eItemKind item_kind)
Opérateur de sortie sur un flot.
ARCANE_DATATYPE_EXPORT eDataType dataTypeFromName(const char *name, bool &has_error)
Trouve le type associé à name.
ArrayView< Real > RealArrayView
Equivalent C d'un tableau à une dimension de réels.
const char * dataTypeName(eDataType type)
Nom du type de donnée.
std::int32_t Int32
Type entier signé sur 32 bits.