Arcane  v4.1.1.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ArccoreGlobal.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ArccoreGlobal.h (C) 2000-2025 */
9/* */
10/* Déclarations générales de Arccore. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_BASE_ARCCOREGLOBAL_H
13#define ARCCORE_BASE_ARCCOREGLOBAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include <cstdint>
18
19#include "arccore/arccore_config.h"
20
21#ifdef ARCCORE_VALID_TARGET
22# undef ARCCORE_VALID_TARGET
23#endif
24
25// Determine le type de l'os.
26#if defined(__linux)
27# define ARCCORE_OS_LINUX
28#elif defined(__APPLE__) && defined(__MACH__)
29# define ARCCORE_OS_MACOS
30#elif defined(_AIX)
31# define ARCCORE_OS_AIX
32#elif defined(__WIN32__) || defined(__NT__) || defined(WIN32) || defined(_WIN32) || defined(WIN32) || defined(_WINDOWS)
33# define ARCCORE_OS_WIN32
34#elif defined(__CYGWIN__)
35# define ARCCORE_OS_CYGWIN
36#endif
37
38#ifdef ARCCORE_OS_WIN32
39# define ARCCORE_VALID_TARGET
40# define ARCCORE_EXPORT __declspec(dllexport)
41# define ARCCORE_IMPORT __declspec(dllimport)
42
43/* Supprime certains avertissements du compilateur Microsoft */
44# ifdef _MSC_VER
45# pragma warning(disable: 4251) // class 'A' needs to have dll interface for to be used by clients of class 'B'.
46# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
47# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
48# pragma warning(disable: 4355) // 'this' : used in base member initializer list
49# endif
50
51#endif
52
53// Sous Unix, indique que par défaut les symboles de chaque .so sont cachés.
54// Il faut alors explicitement marquer les
55// symboles qu'on souhaite exporter, comme sous windows.
56// La seule différence est que pour gcc avec les instantiations explicites
57// de template, il faut spécifier l'export lors de l'instantiation
58// explicite alors que sous windows c'est dans la classe.
59#ifndef ARCCORE_OS_WIN32
60# define ARCCORE_EXPORT __attribute__ ((visibility("default")))
61# define ARCCORE_IMPORT __attribute__ ((visibility("default")))
62# define ARCCORE_TEMPLATE_EXPORT ARCCORE_EXPORT
63#endif
64
65#ifdef ARCCORE_OS_CYGWIN
66# define ARCCORE_VALID_TARGET
67#endif
68
69#ifdef ARCCORE_OS_LINUX
70# define ARCCORE_VALID_TARGET
71#endif
72
73#ifdef ARCCORE_OS_MACOS
74# define ARCCORE_VALID_TARGET
75#endif
76
77#ifndef ARCCORE_VALID_TARGET
78#error "This target is not supported"
79#endif
80
81#ifndef ARCCORE_EXPORT
82#define ARCCORE_EXPORT
83#endif
84
85#ifndef ARCCORE_IMPORT
86#define ARCCORE_IMPORT
87#endif
88
89#ifndef ARCCORE_TEMPLATE_EXPORT
90#define ARCCORE_TEMPLATE_EXPORT
91#endif
92
93#ifndef ARCCORE_RESTRICT
94#define ARCCORE_RESTRICT
95#endif
96
97#define ARCCORE_STD std
98
99//Tag var as a voluntary unused variable.
100//Works with any compiler but might be improved by using attribute.
101#define ARCCORE_UNUSED(var) do { (void)(var) ; } while(false)
102
103/*---------------------------------------------------------------------------*/
104/*---------------------------------------------------------------------------*/
105
106#ifdef DOXYGEN_DOC
107typedef ARCCORE_TYPE_INT16 Int16;
108typedef ARCCORE_TYPE_INT32 Int32;
109typedef ARCCORE_TYPE_INT64 Int64;
110#endif
111
112/*---------------------------------------------------------------------------*/
113/*---------------------------------------------------------------------------*/
114/*
115 * Macros pour le support de la programmation hétérogène (CPU/GPU)
116 - ARCCORE_DEVICE_CODE: indique une partie de code compilée uniquement sur le device
117 - ARCCORE_HOST_DEVICE: indique que la méthode/variable est accessible à la fois
118 sur le device et l'hôte
119 - ARCCORE_DEVICE: indique que la méthode/variable est accessible uniquement sur
120 le device.
121*/
122
123#if defined(__SYCL_DEVICE_ONLY__)
124# define ARCCORE_DEVICE_CODE
125# define ARCCORE_DEVICE_TARGET_SYCL
126#elif defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__)
127# define ARCCORE_DEVICE_CODE
128# if defined(__HIP_DEVICE_COMPILE__)
129# define ARCCORE_DEVICE_TARGET_HIP
130# endif
131# if defined(__CUDA_ARCH__)
132# define ARCCORE_DEVICE_TARGET_CUDA
133// Nécessaire pour assert() par exemple dans arccoreCheckAt()
134// TODO: regarder si cela est aussi nécessaire pour AMD HIP.
135#include <cassert>
136# endif
137#endif
138
139#if defined(__CUDACC__) || defined(__HIP__)
140#define ARCCORE_HOST_DEVICE __host__ __device__
141#define ARCCORE_DEVICE __device__
142#endif
143
144
145#ifndef ARCCORE_HOST_DEVICE
146#define ARCCORE_HOST_DEVICE
147#endif
148
149#ifndef ARCCORE_DEVICE
150#define ARCCORE_DEVICE
151#endif
152
153#if defined(ARCCORE_HAS_CUDA) && defined(__CUDACC__)
158#define ARCCORE_COMPILING_CUDA
160#define ARCANE_COMPILING_CUDA
161#endif
162#if defined(ARCCORE_HAS_HIP) && defined(__HIP__)
167#define ARCCORE_COMPILING_HIP
169#define ARCANE_COMPILING_HIP
170#endif
171
172#if defined(ARCCORE_HAS_SYCL)
173# if defined(SYCL_LANGUAGE_VERSION) || defined(__ADAPTIVECPP__)
178# define ARCCORE_COMPILING_SYCL
180# define ARCANE_COMPILING_SYCL
181# endif
182#endif
183
184#if defined(ARCCORE_COMPILING_CUDA) || defined(ARCCORE_COMPILING_HIP)
189#define ARCCORE_COMPILING_CUDA_OR_HIP
191#define ARCANE_COMPILING_CUDA_OR_HIP
192#endif
193
194/*---------------------------------------------------------------------------*/
195/*---------------------------------------------------------------------------*/
196
197#if defined(ARCCORE_COMPONENT_arccore_base)
198#define ARCCORE_BASE_EXPORT ARCCORE_EXPORT
199#define ARCCORE_BASE_EXTERN_TPL
200#else
201#define ARCCORE_BASE_EXPORT ARCCORE_IMPORT
202#define ARCCORE_BASE_EXTERN_TPL extern
203#endif
204
205#ifdef ARCCORE_REAL_USE_APFLOAT
206# include <apfloat.h>
207#endif
208
209/*---------------------------------------------------------------------------*/
210/*---------------------------------------------------------------------------*/
211
212namespace Arcane
213{
214
215/*---------------------------------------------------------------------------*/
216/*---------------------------------------------------------------------------*/
217/*
218 * Définition des types Arccore Int16, Int32 et Int64.
219 */
221using Int8 = std::int8_t;
223using Int16 = std::int16_t;
225using Int32 = std::int32_t;
227using Int64 = std::int64_t;
229using UInt32 = std::uint32_t;
231using UInt64 = std::uint64_t;
232
233/*---------------------------------------------------------------------------*/
234/*---------------------------------------------------------------------------*/
240using Pointer = void*;
241
242#ifdef ARCCORE_REAL_USE_APFLOAT
243# define ARCCORE_REAL(val) (Real(#val,1000))
244# define ARCCORE_REAL_NOT_BUILTIN
245using Real = apfloat;
246using APReal = apfloat;
247#else
248# ifdef ARCCORE_REAL_LONG
249# define ARCCORE_REAL(val) val##L
255using long double Real;
256# else
257# define ARCCORE_REAL(val) val
258# define ARCCORE_REAL_IS_DOUBLE
264using Real = double;
265# endif
268{
269 public:
270 Real v[4];
271};
272#endif
273
274#ifdef ARCCORE_64BIT
275# define ARCCORE_INTEGER_MAX ARCCORE_INT64_MAX
276using Short = Int32;
277using Integer = Int64;
278#else
279# define ARCCORE_INTEGER_MAX ARCCORE_INT32_MAX
280using Short = Int32;
282#endif
283
288
289
309
310/*---------------------------------------------------------------------------*/
311/*---------------------------------------------------------------------------*/
312
314class BFloat16;
315
317class Float16;
318
320using Float32 = float;
321
323class Float128;
324
326class Int128;
327
328/*---------------------------------------------------------------------------*/
329/*---------------------------------------------------------------------------*/
330
335struct TrueType {};
340struct FalseType {};
341
342/*---------------------------------------------------------------------------*/
343/*---------------------------------------------------------------------------*/
344
345#ifdef __GNUG__
346# define ARCCORE_DEPRECATED __attribute__ ((deprecated))
347#endif
348
349#ifdef _MSC_VER
350# if _MSC_VER >= 1300
351# define ARCCORE_DEPRECATED __declspec(deprecated)
352# endif
353#endif
354
355#define ARCCORE_DEPRECATED_2017 ARCCORE_DEPRECATED
356#define ARCCORE_DEPRECATED_2018 ARCCORE_DEPRECATED
357#define ARCCORE_DEPRECATED_2019(reason) [[deprecated(reason)]]
358#define ARCCORE_DEPRECATED_2020(reason) [[deprecated(reason)]]
359#define ARCCORE_DEPRECATED_REASON(reason) [[deprecated(reason)]]
360
361// Définir cette macro si on souhaite supprimer de la compilation les
362// méthodes et types obsolètes.
363#define ARCCORE_NO_DEPRECATED
364
365#ifndef ARCCORE_DEPRECATED
366# define ARCCORE_DEPRECATED
367#endif
368
369/*---------------------------------------------------------------------------*/
370/*---------------------------------------------------------------------------*/
371
372/*---------------------------------------------------------------------------*/
373/*---------------------------------------------------------------------------*/
374// Macros de compatibilités avec les différents standards du C++.
375// Maintenant (en 2021) tous les compilateurs avec lesquels Arccore compile
376// ont le support du C++17 donc la plupart de ces macros ne sont plus utiles.
377// On les garde uniquement pour compatibilité avec le code existant.
378
379// La macro ARCCORE_NORETURN utilise l'attribut [[noreturn]] du C++11 pour
380// indiquer qu'une fonction ne retourne pas.
381#define ARCCORE_NORETURN [[noreturn]]
382
384#define ARCCORE_CONSTEXPR constexpr
385
386// Macro pour indiquer qu'on ne lance pas d'exceptions.
387#define ARCCORE_NOEXCEPT noexcept
388
389// Macros pour indiquer qu'on lance pas d'exceptions.
390#define ARCCORE_NOEXCEPT_FALSE noexcept(false)
391
392// Support pour operator[](a,b,...)
393#ifdef __cpp_multidimensional_subscript
394#define ARCCORE_HAS_MULTI_SUBSCRIPT
395#endif
396
397/*---------------------------------------------------------------------------*/
398/*---------------------------------------------------------------------------*/
399// Macros pour l'attribut [[no_unique_address]]
400// Avec VS2022, cet attribut n'est pas pris en compte et il faut
401// utiliser [[msvc::no_unique_address]]
402#ifdef _MSC_VER
403#define ARCCORE_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
404#else
405#define ARCCORE_NO_UNIQUE_ADDRESS [[no_unique_address]]
406#endif
407
408/*---------------------------------------------------------------------------*/
409/*---------------------------------------------------------------------------*/
410
411// Support pour l'alignement.
412// le C++11 utilise le mot clé alignas pour spécifier l'alignement.
413// Cela fonctionne avec GCC 4.9+ et Visual Studio 2015. Cela ne fonctionne
414// pas avec Visual Studio 2013. Donc pour Visual Studio on utilise dans tous
415// les cas __declspec qui fonctionne toujours. Sous Linux, __attribute__ fonctionne
416// aussi toujours donc on utilise cela. A noter que les structures Simd ont besoin
417// de l'attribut 'packed' qui n'existe que avec GCC et Intel. Il ne semble pas y avoir
418// d'équivalent avec MSVC.
419#ifdef _MSC_VER
421# define ARCCORE_ALIGNAS(value) __declspec(align(value))
423# define ARCCORE_ALIGNAS_PACKED(value) __declspec(align(value))
424#else
426# define ARCCORE_ALIGNAS_PACKED(value) __attribute__ ((aligned (value),packed))
428# define ARCCORE_ALIGNAS(value) __attribute__ ((aligned (value)))
429#endif
430
431/*---------------------------------------------------------------------------*/
432/*---------------------------------------------------------------------------*/
433
434#if defined(ARCCORE_CHECK) || defined(ARCCORE_DEBUG)
435# ifndef ARCCORE_DEBUG_ASSERT
436# define ARCCORE_DEBUG_ASSERT
437# endif
438#endif
439
440/*---------------------------------------------------------------------------*/
441/*---------------------------------------------------------------------------*/
448extern "C++" ARCCORE_BASE_EXPORT
449bool arccoreIsCheck();
450
458extern "C++" ARCCORE_BASE_EXPORT
459void arccoreSetCheck(bool v);
460
464extern "C++" ARCCORE_BASE_EXPORT
466
467/*---------------------------------------------------------------------------*/
468/*---------------------------------------------------------------------------*/
469
471extern "C++" ARCCORE_BASE_EXPORT void
472arccorePrintf(const char*,...);
473
474/*---------------------------------------------------------------------------*/
475/*---------------------------------------------------------------------------*/
486extern "C++" ARCCORE_BASE_EXPORT void
487arccoreDebugPause(const char* msg);
488
489/*---------------------------------------------------------------------------*/
490/*---------------------------------------------------------------------------*/
496extern "C++" ARCCORE_BASE_EXPORT void
498
499/*---------------------------------------------------------------------------*/
500/*---------------------------------------------------------------------------*/
508#define ARCCORE_THROW(exception_class,...) \
509 throw exception_class (A_FUNCINFO,Arccore::String::format(__VA_ARGS__))
510
520#define ARCCORE_THROW_IF(cond, exception_class, ...) \
521 if (cond) [[unlikely]] \
522 ARCCORE_THROW(exception_class,__VA_ARGS__)
523
524/*---------------------------------------------------------------------------*/
525/*---------------------------------------------------------------------------*/
532#define ARCCORE_FATAL(...)\
533 ARCCORE_THROW(::Arccore::FatalErrorException,__VA_ARGS__)
534
543#define ARCCORE_FATAL_IF(cond, ...) \
544 ARCCORE_THROW_IF(cond, ::Arccore::FatalErrorException,__VA_ARGS__)
545
546/*---------------------------------------------------------------------------*/
547/*---------------------------------------------------------------------------*/
555extern "C++" ARCCORE_BASE_EXPORT void
556arccoreNullPointerError ARCCORE_NORETURN ();
557
558/*---------------------------------------------------------------------------*/
559/*---------------------------------------------------------------------------*/
572extern "C++" ARCCORE_BASE_EXPORT void
573arccoreRangeError ARCCORE_NORETURN (Int64 i,Int64 min_value_inclusive,
574 Int64 max_value_exclusive);
575
576/*---------------------------------------------------------------------------*/
577/*---------------------------------------------------------------------------*/
587extern "C++" ARCCORE_BASE_EXPORT void
588arccoreRangeError ARCCORE_NORETURN (Int64 i,Int64 max_size);
589
590/*---------------------------------------------------------------------------*/
591/*---------------------------------------------------------------------------*/
598inline ARCCORE_HOST_DEVICE void
599arccoreCheckRange(Int64 i,Int64 min_value_inclusive,Int64 max_value_exclusive)
600{
601 if (i>=min_value_inclusive && i<max_value_exclusive)
602 return;
603#ifndef ARCCORE_DEVICE_CODE
604 arccoreRangeError(i,min_value_inclusive,max_value_exclusive);
605#elif defined(ARCCORE_DEVICE_TARGET_CUDA)
606 // Code pour le device.
607 // assert() est disponible pour CUDA.
608 // TODO: regarder si une fonction similaire existe pour HIP
609 assert(false);
610#endif
611}
612
613/*---------------------------------------------------------------------------*/
614/*---------------------------------------------------------------------------*/
620inline ARCCORE_HOST_DEVICE void
622{
623 arccoreCheckRange(i,0,max_size);
624}
625
626#if defined(ARCCORE_CHECK) || defined(ARCCORE_DEBUG)
627#define ARCCORE_CHECK_AT(a,b) ::Arccore::arccoreCheckAt((a),(b))
628#define ARCCORE_CHECK_RANGE(a,b,c) ::Arccore::arccoreCheckRange((a),(b),(c))
629#else
630#define ARCCORE_CHECK_AT(a,b)
631#define ARCCORE_CHECK_RANGE(a,b,c)
632#endif
633
634#define ARCCORE_CHECK_AT2(a0,a1,b0,b1) \
635 ARCCORE_CHECK_AT(a0,b0); ARCCORE_CHECK_AT(a1,b1)
636#define ARCCORE_CHECK_AT3(a0,a1,a2,b0,b1,b2) \
637 ARCCORE_CHECK_AT(a0,b0); ARCCORE_CHECK_AT(a1,b1); ARCCORE_CHECK_AT(a2,b2)
638#define ARCCORE_CHECK_AT4(a0,a1,a2,a3,b0,b1,b2,b3) \
639 ARCCORE_CHECK_AT(a0,b0); ARCCORE_CHECK_AT(a1,b1); ARCCORE_CHECK_AT(a2,b2); ARCCORE_CHECK_AT(a3,b3)
640
641/*---------------------------------------------------------------------------*/
642/*---------------------------------------------------------------------------*/
643
644#define ARCCORE_CAST_SMALL_SIZE(a) ((Integer)(a))
645
646/*---------------------------------------------------------------------------*/
647/*---------------------------------------------------------------------------*/
648
649extern "C++" ARCCORE_BASE_EXPORT void
650_doAssert(const char*,const char*,const char*,int);
651template<typename T> inline T*
652_checkPointer(const T* t,const char* file,const char* func,int line)
653{
654 if (!t){
655 _doAssert("ARCCORE_ASSERT",file,func,line);
656 arccorePrintf("Bad Pointer");
657 }
658 return t;
659}
660
661/*---------------------------------------------------------------------------*/
662/*---------------------------------------------------------------------------*/
663// Macro pour obtenir par le pré-processeur le nom de la fonction actuelle
664
665#if defined(__GNUG__)
666# define ARCCORE_MACRO_FUNCTION_NAME __PRETTY_FUNCTION__
667#elif defined( _MSC_VER)
668# define ARCCORE_MACRO_FUNCTION_NAME __FUNCTION__
669#else
670# define ARCCORE_MACRO_FUNCTION_NAME __func__
671#endif
672
673/*---------------------------------------------------------------------------*/
674/*---------------------------------------------------------------------------*/
675/*
676 * Macros utilisées pour le débug.
677 */
678#ifdef ARCCORE_DEBUG_ASSERT
679# define ARCCORE_D_WHERE(a) ::Arcane::_doAssert(a, __FILE__, ARCCORE_MACRO_FUNCTION_NAME, __LINE__)
680# define ARCCORE_DCHECK_POINTER(a) ::Arcane::_checkPointer((a), __FILE__, ARCCORE_MACRO_FUNCTION_NAME, __LINE__);
681# define ARCCORE_CHECK_PTR(a) \
682 { \
683 if (!(a)) { \
684 ::Arcane::arccorePrintf("Null value"); \
685 ARCCORE_D_WHERE("ARCCORE_ASSERT"); \
686 } \
687 }
688
689# define ARCCORE_ASSERT(a,b) \
690 { \
691 if (!(a)) { \
692 ::Arcane::arccorePrintf("Assertion '%s' fails:", #a); \
693 ::Arcane::arccorePrintf b; \
694 ARCCORE_D_WHERE("ARCCORE_ASSERT"); \
695 } \
696 }
697# define ARCCORE_WARNING(a) \
698 { \
699 ::Arcane::arccorePrintf a; \
700 ARCCORE_D_WHERE("ARCCORE_WARNING"); \
701 }
702#else
703# define ARCCORE_CHECK_PTR(a)
704# define ARCCORE_ASSERT(a,b)
705# define ARCCORE_WARNING(a)
706# define ARCCORE_DCHECK_POINTER(a) (a);
707#endif
708
709/*---------------------------------------------------------------------------*/
710/*---------------------------------------------------------------------------*/
722extern "C++" ARCCORE_BASE_EXPORT void
723arccoreThrowNullPointerError [[noreturn]] (const char* ptr_name,const char* text);
724
725/*---------------------------------------------------------------------------*/
726/*---------------------------------------------------------------------------*/
733inline void*
734arccoreThrowIfNull(void* ptr,const char* ptr_name,const char* text)
735{
736 if (!ptr)
737 arccoreThrowNullPointerError(ptr_name,text);
738 return ptr;
739}
740
747inline const void*
748arccoreThrowIfNull(const void* ptr,const char* ptr_name,const char* text)
749{
750 if (!ptr)
751 arccoreThrowNullPointerError(ptr_name,text);
752 return ptr;
753}
754
755/*---------------------------------------------------------------------------*/
756/*---------------------------------------------------------------------------*/
763#define ARCCORE_CHECK_POINTER(ptr) \
764 arccoreThrowIfNull(ptr,#ptr,nullptr)
765
772#define ARCCORE_CHECK_POINTER2(ptr,text)\
773 arccoreThrowIfNull(ptr,#ptr,text)
774
775/*---------------------------------------------------------------------------*/
776/*---------------------------------------------------------------------------*/
777
778// Défitions des types de base.
779class String;
780class StringView;
782class StringBuilder;
783// Pas dans cette composante mais comme cette interface on la met ici
784// pour compatibilité avec l'existant
785class ITraceMng;
786
787/*---------------------------------------------------------------------------*/
788/*---------------------------------------------------------------------------*/
789
790} // End namespace Arcane
791
792/*---------------------------------------------------------------------------*/
793/*---------------------------------------------------------------------------*/
794
795/*---------------------------------------------------------------------------*/
796/*---------------------------------------------------------------------------*/
797
798namespace Arccore
799{
800using Arcane::ITraceMng;
801using Arcane::String;
802using Arcane::StringBuilder;
803using Arcane::StringFormatterArg;
804using Arcane::StringView;
805using Arcane::UInt32;
806using Arcane::UInt64;
807
808using Arcane::APReal;
809using Arcane::Integer;
810using Arcane::Pointer;
811using Arcane::Real;
812using Arcane::Short;
813
816
819
821using Float32 = float;
822
825
828
831using Int16 = Arcane::Int16;
832using Int32 = Arcane::Int32;
833using Int64 = Arcane::Int64;
834
847
849using Arcane::TrueType;
851using Arcane::_checkPointer;
852}
853
854/*---------------------------------------------------------------------------*/
855/*---------------------------------------------------------------------------*/
856
857#endif
Emulation de réel en précision arbitraire.
Type flottant demi-précision.
Interface du gestionnaire de traces.
Constructeur de chaîne de caractère unicode.
Classe utilisée pour formatter une chaîne de caractères.
Vue sur une chaîne de caractères UTF-8.
Definition StringView.h:47
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.
void * arccoreThrowIfNull(void *ptr, const char *ptr_name, const char *text)
Vérifie qu'un pointeur n'est pas nul.
std::uint64_t UInt64
Type entier non signé sur 64 bits.
std::uint32_t UInt32
Type entier non signé sur 32 bits.
ARCCORE_BASE_EXPORT void arccoreNullPointerError()
Signalue l'utilisation d'un pointeur nul.
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
void * Pointer
Type représentant un pointeur.
ARCCORE_BASE_EXPORT bool arccoreIsDebug()
Vrai si la macro ARCCORE_DEBUG est définie.
ARCCORE_BASE_EXPORT void arccorePrintf(const char *format,...)
Encapsulation de la fonction C printf.
__host__ __device__ void arccoreCheckRange(Int64 i, Int64 min_value_inclusive, Int64 max_value_exclusive)
Vérifie que min_value_inclusive <= i < max_value_exclusive.
__host__ __device__ void arccoreCheckAt(Int64 i, Int64 max_size)
Vérifie un éventuel débordement de tableau.
ARCCORE_BASE_EXPORT void arccoreDebugPause(const char *msg)
Passe en mode pause ou lance une erreur fatale.
std::int16_t Int16
Type entier signé sur 16 bits.
double Real
Type représentant un réel.
ARCCORE_BASE_EXPORT void arccoreRangeError(Int64 i, Int64 min_value_inclusive, Int64 max_value_exclusive)
Signale qu'une valeur n'est pas dans l'intervalle souhaité.
ARCCORE_BASE_EXPORT void arccoreThrowNullPointerError(const char *ptr_name, const char *text)
Signalee l'utilisation d'un pointeur nul en envoyant une exception.
float Float32
Type flottant IEEE-753 simple précision.
ARCCORE_BASE_EXPORT bool arccoreIsCheck()
Vrai si on est en mode vérification.
void _doAssert(const char *text, const char *file, const char *func, size_t line)
Definition Misc.cc:235
ARCCORE_BASE_EXPORT void arccoreSetPauseOnError(bool v)
Indique si on l'appel à arccoreDebugPause() effectue une pause.
ARCCORE_BASE_EXPORT void arccoreSetCheck(bool v)
Active ou désactive le mode vérification.
std::int32_t Int32
Type entier signé sur 32 bits.
Espace de nom de Arccore.
Arcane::Float128 Float128
Type représentant un floattan sur 128 bits.
Arcane::BFloat16 BFloat16
Type 'Brain Float16'.
float Float32
Type flottant IEEE-753 simple précision (binary32)
Arcane::Float16 Float16
Type 'Float16' (binary16)
Arcane::Int8 Int8
Type représentant un entier sur 8 bits.
Arcane::Int128 Int128
Type représentant un entier sur 128 bits.
Structure équivalente à la valeur booléenne vrai.
Structure équivalente à la valeur booléenne vrai.