Arcane  v3.15.3.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ArcaneGlobal.h
Aller à la documentation de ce fichier.
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/* ArcaneGlobal.h (C) 2000-2025 */
9/* */
10/* Déclarations générales de Arcane. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_ARCANEGLOBAL_H
13#define ARCANE_UTILS_ARCANEGLOBAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/base/ArccoreGlobal.h"
18
19// Infos globales sur les options de compilation comme
20// les threads, le mode debug, ...
21#include "arcane_core_config.h"
22
23#ifdef ARCCORE_OS_LINUX
24# define ARCANE_OS_LINUX
25# include <cstddef>
26#endif
27
28#ifdef ARCCORE_OS_WIN32
29# define ARCANE_OS_WIN32
30#endif
31
32#define ARCANE_EXPORT ARCCORE_EXPORT
33#define ARCANE_IMPORT ARCCORE_IMPORT
34#define ARCANE_TEMPLATE_EXPORT ARCCORE_TEMPLATE_EXPORT
35#define ARCANE_RESTRICT ARCCORE_RESTRICT
36
37#define ARCANE_STD std
38
39//Tag var as a voluntary unused variable.
40//Works with any compiler but might be improved by using attribute.
41#define ARCANE_UNUSED(var) ARCCORE_UNUSED(var)
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46#if defined(ARCANE_HAS_CUDA) && defined(__CUDACC__)
51#define ARCANE_COMPILING_CUDA
52#endif
53#if defined(ARCANE_HAS_HIP) && defined(__HIP__)
58#define ARCANE_COMPILING_HIP
59#endif
60
61#if defined(ARCANE_HAS_SYCL)
62# if defined(SYCL_LANGUAGE_VERSION) || defined(__ADAPTIVECPP__)
67# define ARCANE_COMPILING_SYCL
68# endif
69#endif
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73// TODO: supprimer l'inclusion de <iosfwd> et les using.
74// Pour l'instant (2022), on supprime ces inclusions uniquement pour Arcane.
75
76#ifndef ARCANE_NO_USING_FOR_STREAM
77#include <iosfwd>
78using std::istream;
79using std::ostream;
80using std::ios;
81using std::ifstream;
82using std::ofstream;
83using std::ostringstream;
84using std::istringstream;
85#endif
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90#ifdef DOXYGEN_DOC
91typedef ARCANE_TYPE_INT16 Int16;
92typedef ARCANE_TYPE_INT32 Int32;
93typedef ARCANE_TYPE_INT64 Int64;
94#endif
95
96#define ARCANE_BEGIN_NAMESPACE namespace Arcane {
97#define ARCANE_END_NAMESPACE }
98#define NUMERICS_BEGIN_NAMESPACE namespace Numerics {
99#define NUMERICS_END_NAMESPACE }
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
103
104#ifdef ARCANE_COMPONENT_FULL
105#define ARCANE_COMPONENT_arcane_utils
106#define ARCANE_COMPONENT_arcane
107#define ARCANE_COMPONENT_arcane_mesh
108#define ARCANE_COMPONENT_arcane_std
109#define ARCANE_COMPONENT_arcane_impl
110#define ARCANE_COMPONENT_arcane_script
111#endif
112
113#if defined(ARCANE_COMPONENT_arcane) || defined(ARCANE_COMPONENT_arcane_core)
114#define ARCANE_CORE_EXPORT ARCANE_EXPORT
115#define ARCANE_EXPR_EXPORT ARCANE_EXPORT
116#define ARCANE_DATATYPE_EXPORT ARCANE_EXPORT
117#define ARCANE_CORE_EXTERN_TPL
118#else
119#define ARCANE_CORE_EXPORT ARCANE_IMPORT
120#define ARCANE_EXPR_EXPORT ARCANE_IMPORT
121#define ARCANE_DATATYPE_EXPORT ARCANE_IMPORT
122#define ARCANE_CORE_EXTERN_TPL extern
123#endif
124
125#ifdef ARCANE_COMPONENT_arcane_utils
126#define ARCANE_UTILS_EXPORT ARCANE_EXPORT
127#define ARCANE_UTILS_EXTERN_TPL
128#else
129#define ARCANE_UTILS_EXPORT ARCANE_IMPORT
130#define ARCANE_UTILS_EXTERN_TPL extern
131#endif
132
133#ifdef ARCANE_COMPONENT_arcane_impl
134#define ARCANE_IMPL_EXPORT ARCANE_EXPORT
135#else
136#define ARCANE_IMPL_EXPORT ARCANE_IMPORT
137#endif
138
139#ifdef ARCANE_COMPONENT_arcane_mesh
140#define ARCANE_MESH_EXPORT ARCANE_EXPORT
141#else
142#define ARCANE_MESH_EXPORT ARCANE_IMPORT
143#endif
144
145#ifdef ARCANE_COMPONENT_arcane_std
146#define ARCANE_STD_EXPORT ARCANE_EXPORT
147#else
148#define ARCANE_STD_EXPORT ARCANE_IMPORT
149#endif
150
151#ifdef ARCANE_COMPONENT_arcane_script
152#define ARCANE_SCRIPT_EXPORT ARCANE_EXPORT
153#else
154#define ARCANE_SCRIPT_EXPORT ARCANE_IMPORT
155#endif
156
157#ifdef ARCANE_COMPONENT_arcane_solvers
158#define ARCANE_SOLVERS_EXPORT ARCANE_EXPORT
159#else
160#define ARCANE_SOLVERS_EXPORT ARCANE_IMPORT
161#endif
162
163#ifdef ARCANE_COMPONENT_arcane_geometry
164#define ARCANE_GEOMETRY_EXPORT ARCANE_EXPORT
165#else
166#define ARCANE_GEOMETRY_EXPORT ARCANE_IMPORT
167#endif
168
169#ifdef ARCANE_COMPONENT_arcane_thread
170#define ARCANE_THREAD_EXPORT ARCANE_EXPORT
171#else
172#define ARCANE_THREAD_EXPORT ARCANE_IMPORT
173#endif
174
175#ifdef ARCANE_COMPONENT_arcane_mpi
176#define ARCANE_MPI_EXPORT ARCANE_EXPORT
177#else
178#define ARCANE_MPI_EXPORT ARCANE_IMPORT
179#endif
180
181#ifdef ARCANE_COMPONENT_arcane_hyoda
182#define ARCANE_HYODA_EXPORT ARCANE_EXPORT
183#else
184#define ARCANE_HYODA_EXPORT ARCANE_IMPORT
185#endif
186
187#ifdef ARCANE_REAL_USE_APFLOAT
188#include <apfloat.h>
189#endif
190
191/*---------------------------------------------------------------------------*/
192/*---------------------------------------------------------------------------*/
193
194namespace Arcane
195{
196
197/*---------------------------------------------------------------------------*/
198/*---------------------------------------------------------------------------*/
199
200#define ARCANE_HAS_LONG_LONG
201
202/*---------------------------------------------------------------------------*/
203/*---------------------------------------------------------------------------*/
204
205const double cgrEPSILON_DELTA = 1.0e-2;
206const double cgrPI = 3.14159265358979323846;
207
208/*---------------------------------------------------------------------------*/
209/*---------------------------------------------------------------------------*/
210
211#define ARCANE_REAL(val) ARCCORE_REAL(val)
212
213#ifdef ARCCORE_REAL_NOT_BUILTIN
214# define ARCANE_REAL_NOT_BUILTIN
215#endif
216
217#ifdef ARCCORE_REAL_LONG
218# define ARCANE_REAL_LONG
219#endif
220
221#ifdef ARCCORE_REAL_IS_DOUBLE
222# define ARCANE_REAL_IS_DOUBLE
223#endif
224
232using LocalIdType = Int32;
233
241using UniqueIdType = Int64;
242
268/*---------------------------------------------------------------------------*/
269/*---------------------------------------------------------------------------*/
270
272extern "C++" ARCANE_UTILS_EXPORT void
273arcanePrintf(const char*,...);
274
275/*---------------------------------------------------------------------------*/
276/*---------------------------------------------------------------------------*/
277
288extern "C++" ARCANE_UTILS_EXPORT void
289arcaneDebugPause(const char* msg);
290
291/*---------------------------------------------------------------------------*/
292/*---------------------------------------------------------------------------*/
293
294extern "C++" ARCANE_UTILS_EXPORT void
295_internalArcaneMathError(long double arg_value,const char* func_name);
296
297extern "C++" ARCANE_UTILS_EXPORT void
298_internalArcaneMathError(long double arg_value1,long double arg_value2,const char* func_name);
299
300/*---------------------------------------------------------------------------*/
301/*---------------------------------------------------------------------------*/
310ARCCORE_HOST_DEVICE inline void
311arcaneMathError(long double arg_value,const char* func_name)
312{
313#ifndef ARCCORE_DEVICE_CODE
314 _internalArcaneMathError(arg_value,func_name);
315#else
316 ARCANE_UNUSED(arg_value);
317 ARCANE_UNUSED(func_name);
318#endif
319}
320
330ARCCORE_HOST_DEVICE inline void
331arcaneMathError(long double arg_value1,long double arg_value2,const char* func_name)
332{
333#ifndef ARCCORE_DEVICE_CODE
334 _internalArcaneMathError(arg_value1,arg_value2,func_name);
335#else
336 ARCANE_UNUSED(arg_value1);
337 ARCANE_UNUSED(arg_value2);
338 ARCANE_UNUSED(func_name);
339#endif
340}
341
342/*---------------------------------------------------------------------------*/
343/*---------------------------------------------------------------------------*/
354extern "C++" ARCANE_UTILS_EXPORT void
355arcaneNotYetImplemented(const char* file,const char* func,unsigned long line,const char* msg);
356
357/*---------------------------------------------------------------------------*/
358/*---------------------------------------------------------------------------*/
359
361extern "C++" ARCANE_UTILS_EXPORT void
362arcaneDeprecated(const char* file,const char* func,unsigned long line,const char* text);
363
364/*---------------------------------------------------------------------------*/
365/*---------------------------------------------------------------------------*/
366
376extern "C++" ARCANE_UTILS_EXPORT void
377arcaneNoReferenceError(const void* ptr);
378
388extern "C++" ARCANE_UTILS_EXPORT void
390
397extern "C++" ARCANE_UTILS_EXPORT Integer
398arcaneCheckArraySize(unsigned long long size);
399
406extern "C++" ARCANE_UTILS_EXPORT Integer
407arcaneCheckArraySize(long long size);
408
415extern "C++" ARCANE_UTILS_EXPORT Integer
416arcaneCheckArraySize(unsigned long size);
417
424extern "C++" ARCANE_UTILS_EXPORT Integer
425arcaneCheckArraySize(long size);
426
433extern "C++" ARCANE_UTILS_EXPORT Integer
434arcaneCheckArraySize(unsigned int size);
435
442extern "C++" ARCANE_UTILS_EXPORT Integer
443arcaneCheckArraySize(int size);
444
449extern "C++" ARCANE_UTILS_EXPORT void
450arcaneCheckAlignment(const void* ptr,Integer alignment);
451
458extern "C++" ARCANE_UTILS_EXPORT
459bool arcaneIsCheck();
460
468extern "C++" ARCANE_UTILS_EXPORT
469void arcaneSetCheck(bool v);
470
474extern "C++" ARCANE_UTILS_EXPORT
475bool arcaneIsDebug();
476
480extern "C++" ARCANE_UTILS_EXPORT
481bool arcaneHasThread();
482
492extern "C++" ARCANE_UTILS_EXPORT
493void arcaneSetHasThread(bool v);
494
500extern "C++" ARCANE_UTILS_EXPORT
501Int64 arcaneCurrentThread();
502
503/*---------------------------------------------------------------------------*/
504/*---------------------------------------------------------------------------*/
505
510struct TrueType {};
515struct FalseType {};
516
517/*---------------------------------------------------------------------------*/
518/*---------------------------------------------------------------------------*/
519
520#ifdef ARCANE_DEBUG
521extern "C++" ARCANE_UTILS_EXPORT bool _checkDebug(size_t);
522#define ARCANE_DEBUGP(a,b) if (_checkDebug(a)) { arcanePrintf b; }
523#else
524#define ARCANE_DEBUGP(a,b)
525#endif
526
527/*---------------------------------------------------------------------------*/
528/*---------------------------------------------------------------------------*/
529
530#ifdef __GNUG__
531# define ARCANE_NOT_YET_IMPLEMENTED(a) \
532{ arcaneNotYetImplemented(__FILE__,__PRETTY_FUNCTION__,__LINE__,(a)); }
533#else
534# define ARCANE_NOT_YET_IMPLEMENTED(a) \
535{ arcaneNotYetImplemented(__FILE__,"(NoInfo)",__LINE__,(a)); }
536#endif
537
538#define ARCANE_DEPRECATED ARCCORE_DEPRECATED
539
540#define ARCANE_DEPRECATED_112 ARCANE_DEPRECATED
541#define ARCANE_DEPRECATED_114 ARCANE_DEPRECATED
542#define ARCANE_DEPRECATED_116 ARCANE_DEPRECATED
543#define ARCANE_DEPRECATED_118 ARCANE_DEPRECATED
544#define ARCANE_DEPRECATED_120 ARCANE_DEPRECATED
545#define ARCANE_DEPRECATED_122 ARCANE_DEPRECATED
546#define ARCANE_DEPRECATED_200 ARCANE_DEPRECATED
547#define ARCANE_DEPRECATED_220 ARCANE_DEPRECATED
548#define ARCANE_DEPRECATED_240 ARCANE_DEPRECATED
549#define ARCANE_DEPRECATED_260 ARCANE_DEPRECATED
550#define ARCANE_DEPRECATED_280 ARCANE_DEPRECATED
551#define ARCANE_DEPRECATED_2018 ARCANE_DEPRECATED
552#define ARCANE_DEPRECATED_2018_R(reason) [[deprecated(reason)]]
553
554#ifndef ARCCORE_DEPRECATED_2021
555#define ARCCORE_DEPRECATED_2021(reason) [[deprecated(reason)]]
556#endif
557
558#define ARCANE_DEPRECATED_REASON(reason) [[deprecated(reason)]]
559
560#ifdef ARCANE_NO_DEPRECATED_LONG_TERM
561#define ARCANE_DEPRECATED_LONG_TERM(reason)
562#else
570#define ARCANE_DEPRECATED_LONG_TERM(reason) [[deprecated(reason)]]
571#endif
572
573// Définir cette macro si on souhaite supprimer de la compilation les
574// méthodes et types obsolètes.
575#define ARCANE_NO_DEPRECATED
576
577// Si la macro est définie, ne notifie pas des méthodes obsolètes des anciennes
578// classes tableaux.
579#ifdef ARCANE_NO_NOTIFY_DEPRECATED_ARRAY
580#define ARCANE_DEPRECATED_ARRAY
581#else
582#define ARCANE_DEPRECATED_ARRAY ARCANE_DEPRECATED
583#endif
584
585/*---------------------------------------------------------------------------*/
586/*---------------------------------------------------------------------------*/
587
588// Les macros suivantes permettent de de créer un identifiant en suffixant
589// le numéro de ligne du fichier. Cela permet d'avoir un identifiant unique
590// pour un fichier et est utilisé par exemple pour générer des noms
591// de variable globale pour l'enregistrement des services.
592// La macro a utiliser est ARCANE_JOIN_WITH_LINE(name).
593#define ARCANE_JOIN_HELPER2(a,b) a ## b
594#define ARCANE_JOIN_HELPER(a,b) ARCANE_JOIN_HELPER2(a,b)
595#define ARCANE_JOIN_WITH_LINE(a) ARCANE_JOIN_HELPER(a,__LINE__)
596
597/*---------------------------------------------------------------------------*/
598/*---------------------------------------------------------------------------*/
599// La macro ARCANE_NORETURN utilise l'attribut [[noreturn]] du C++11 pour
600// indiquer qu'une fonction ne retourne pas.
601#define ARCANE_NORETURN ARCCORE_NORETURN
602
604#define ARCANE_CONSTEXPR ARCCORE_CONSTEXPR
605
606// Le C++11 définit un mot clé 'noexcept' pour indiquer qu'une méthode ne
607// renvoie pas d'exceptions. Malheureusement, comme le support du C++11
608// est fait de manière partielle par les compilateurs, cela ne marche pas
609// pour tous. En particulier, icc 13, 14 et 15 ne supportent pas cela, ni
610// Visual Studio 2013 et antérieurs.
611#define ARCANE_NOEXCEPT ARCCORE_NOEXCEPT
612#define ARCANE_NOEXCEPT_FALSE ARCCORE_NOEXCEPT_FALSE
613
614/*---------------------------------------------------------------------------*/
615/*---------------------------------------------------------------------------*/
616
617// Support pour l'alignement.
618// le C++11 utilise le mot clé alignas pour spécifier l'alignement.
619// Cela fonctionne avec GCC 4.9+ et Visual Studio 2015. Cela ne fonctionne
620// pas avec Visual Studio 2013. Donc pour Visual Studio on utilise dans tous
621// les cas __declspec qui fonctionne toujours. Sous Linux, __attribute__ fonctionne
622// aussi toujours donc on utilise cela. A noter que les structures Simd ont besoin
623// de l'attribut 'packed' qui n'existe que avec GCC et Intel. Il ne semble pas y avoir
624// d'équivalent avec MSVC.
625#ifdef _MSC_VER
627# define ARCANE_ALIGNAS(value) __declspec(align(value))
629# define ARCANE_ALIGNAS_PACKED(value) __declspec(align(value))
630#else
632# define ARCANE_ALIGNAS_PACKED(value) __attribute__ ((aligned (value),packed))
634# define ARCANE_ALIGNAS(value) __attribute__ ((aligned (value)))
635#endif
636
637/*---------------------------------------------------------------------------*/
638/*---------------------------------------------------------------------------*/
639
640#ifdef ARCANE_SWIG
641#ifdef ARCANE_DEPRECATED
642#undef ARCANE_DEPRECATED
643#endif
644#endif
645
646/*---------------------------------------------------------------------------*/
647/*---------------------------------------------------------------------------*/
648
649#if defined(ARCANE_CHECK) || defined(ARCANE_DEBUG)
650#ifndef ARCANE_DEBUG_ASSERT
651#define ARCANE_DEBUG_ASSERT
652#endif
653#endif
654
655/*---------------------------------------------------------------------------*/
656/*---------------------------------------------------------------------------*/
664extern "C++" ARCANE_UTILS_EXPORT void
665arcaneNullPointerError [[noreturn]] ();
666
667/*---------------------------------------------------------------------------*/
668/*---------------------------------------------------------------------------*/
680extern "C++" ARCANE_UTILS_EXPORT void
681arcaneThrowNullPointerError [[noreturn]] (const char* ptr_name,const char* text);
682
683/*---------------------------------------------------------------------------*/
684/*---------------------------------------------------------------------------*/
688static inline void
689arcaneCheckNull(const void* ptr)
690{
691 if (!ptr)
693}
694
695/*---------------------------------------------------------------------------*/
696/*---------------------------------------------------------------------------*/
705static const Integer SIMD_PADDING_SIZE = 8;
706
707/*---------------------------------------------------------------------------*/
708/*---------------------------------------------------------------------------*/
717extern "C++" ARCANE_UTILS_EXPORT Integer
718arcaneSizeWithPadding(Integer size);
719
720/*---------------------------------------------------------------------------*/
721/*---------------------------------------------------------------------------*/
722
723/*
724 * Macros utilisées pour le débug.
725 */
726#ifdef ARCANE_DEBUG_ASSERT
727extern "C++" ARCANE_UTILS_EXPORT void _doAssert(const char*,const char*,const char*,size_t);
728template<typename T> inline T*
729_checkPointer(T* t,const char* file,const char* func,size_t line)
730{
731 if (!t){
732 _doAssert("ARCANE_ASSERT",file,func,line);
733 arcanePrintf("Bad Pointer");
734 }
735 return t;
736}
737# ifdef __GNUG__
738# define ARCANE_D_WHERE(a) Arcane::_doAssert(a,__FILE__,__PRETTY_FUNCTION__,__LINE__)
739# define ARCANE_DCHECK_POINTER(a) Arcane::_checkPointer((a),__FILE__,__PRETTY_FUNCTION__,__LINE__);
740# else
741# define ARCANE_D_WHERE(a) Arcane::_doAssert(a,__FILE__,"(NoInfo)",__LINE__)
742# define ARCANE_DCHECK_POINTER(a) Arcane::_checkPointer((a),__FILE__,"(NoInfo"),__LINE__);
743# endif
744# define ARCANE_CHECK_PTR(a) \
745 {if (!(a)){Arcane::arcanePrintf("Null value");ARCANE_D_WHERE("ARCANE_ASSERT");}}
746
747# define ARCANE_ASSERT(a,b) \
748 {if (!(a)){ Arcane::arcanePrintf("Assertion '%s' fails:",#a); Arcane::arcanePrintf b; ARCANE_D_WHERE("ARCANE_ASSERT");}}
749# define ARCANE_WARNING(a) \
750 { Arcane::arcanePrintf a; ARCANE_D_WHERE("ARCANE_WARNING"); }
751#else
752# define ARCANE_CHECK_PTR(a)
753# define ARCANE_ASSERT(a,b)
754# define ARCANE_WARNING(a)
755# define ARCANE_DCHECK_POINTER(a) (a);
756#endif
757
758/*---------------------------------------------------------------------------*/
759/*---------------------------------------------------------------------------*/
767#define ARCANE_THROW(exception_class,...) \
768 throw exception_class (A_FUNCINFO,Arcane::String::format(__VA_ARGS__))
769
770/*---------------------------------------------------------------------------*/
771/*---------------------------------------------------------------------------*/
778#define ARCANE_FATAL(...)\
779 throw Arcane::FatalErrorException(A_FUNCINFO,Arcane::String::format(__VA_ARGS__))
780
781/*---------------------------------------------------------------------------*/
782/*---------------------------------------------------------------------------*/
789static inline void*
790arcaneThrowIfNull(void* ptr,const char* ptr_name,const char* text)
791{
792 if (!ptr)
793 arcaneThrowNullPointerError(ptr_name,text);
794 return ptr;
795}
796
797/*---------------------------------------------------------------------------*/
798/*---------------------------------------------------------------------------*/
805static inline const void*
806arcaneThrowIfNull(const void* ptr,const char* ptr_name,const char* text)
807{
808 if (!ptr)
809 arcaneThrowNullPointerError(ptr_name,text);
810 return ptr;
811}
812
813/*---------------------------------------------------------------------------*/
814/*---------------------------------------------------------------------------*/
821template<typename T> inline T*
822arcaneThrowIfNull(T* ptr,const char* ptr_name,const char* text)
823{
824 if (!ptr)
826 return ptr;
827}
828
829/*---------------------------------------------------------------------------*/
830/*---------------------------------------------------------------------------*/
837#define ARCANE_CHECK_POINTER(ptr) \
838 arcaneThrowIfNull(ptr,#ptr,nullptr)
839
846#define ARCANE_CHECK_POINTER2(ptr,text)\
847 arcaneThrowIfNull(ptr,#ptr,text)
848
849/*---------------------------------------------------------------------------*/
850/*---------------------------------------------------------------------------*/
860extern "C++" ARCANE_UTILS_EXPORT void
861arcaneRangeError [[noreturn]] (Int64 i,Int64 max_size);
862
866static inline constexpr ARCCORE_HOST_DEVICE void
867arcaneCheckAt(Int64 i,Int64 max_size)
868{
869#ifndef ARCCORE_DEVICE_CODE
870 if (i<0 || i>=max_size)
871 arcaneRangeError(i,max_size);
872#else
873 ARCANE_UNUSED(i);
874 ARCANE_UNUSED(max_size);
875#endif
876}
877
878#if defined(ARCANE_CHECK) || defined(ARCANE_DEBUG)
879#define ARCANE_CHECK_AT(a,b) ::Arcane::arcaneCheckAt((a),(b))
880#else
881#define ARCANE_CHECK_AT(a,b)
882#endif
883
884/*---------------------------------------------------------------------------*/
885/*---------------------------------------------------------------------------*/
886
887} // End namespace Arcane
888
889/*---------------------------------------------------------------------------*/
890/*---------------------------------------------------------------------------*/
891
892#endif
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:149
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
void arcaneNoReferenceErrorCallTerminate(const void *ptr)
Utilisation d'un objet non référencé.
Definition Misc.cc:182
Int64 arcaneCurrentThread()
Retourne l'identifiant du thread courant.
Definition Misc.cc:117
Integer arcaneCheckArraySize(unsigned long long size)
Vérifie que size peut être converti dans un 'Integer' pour servir de taille à un tableau....
bool arcaneIsCheck()
Vrai si on est en mode vérification.
Definition Misc.cc:68
bool arcaneHasThread()
Vrai si arcane est compilé avec le support des threads ET qu'ils sont actifs.
Definition Misc.cc:99
void arcaneSetHasThread(bool v)
Active ou désactive le support des threads.
Definition Misc.cc:105
void arcaneNullPointerError()
Signalue l'utilisation d'un pointeur nul.
void arcanePrintf(const char *,...)
Encapsulation de la fonction C printf.
Definition Misc.cc:192
void arcaneNotYetImplemented(const char *file, const char *func, unsigned long line, const char *text)
Signale une fonction non implémentée.
Integer arcaneSizeWithPadding(Integer size)
Retourne la taille avec padding pour une taille size.
void arcaneDeprecated(const char *file, const char *func, unsigned long line, const char *text)
Signale l'utilisation d'une fonction obsolète.
bool arcaneIsDebug()
Vrai si la macro ARCANE_DEBUG est définie.
Definition Misc.cc:80
ARCCORE_HOST_DEVICE void arcaneMathError(long double arg_value, const char *func_name)
Signale un argument invalide d'une fonction mathématique.
void arcaneSetCheck(bool v)
Active ou désactive le mode vérification.
Definition Misc.cc:74
void arcaneNoReferenceError(const void *ptr)
Utilisation d'un objet non référencé.
Definition Misc.cc:172
bool _checkDebug(unsigned int val)
Definition Misc.cc:252
Int32 LocalIdType
Type des entiers utilisés pour stocker les identifiants locaux des entités.
void _doAssert(const char *text, const char *file, const char *func, size_t line)
Definition Misc.cc:235
void arcaneDebugPause(const char *msg)
Passe en mode pause ou lance une erreur fatale.
Definition Misc.cc:137
Int64 UniqueIdType
Type des entiers utilisés pour stocker les identifiants uniques (globaux) des entités.
void arcaneCheckAlignment(const void *ptr, Integer alignment)
Vérifie que ptr est aligné sur alignment octets. Si ce n'est pas le cas, Sinon, lance une exception d...
void arcaneThrowNullPointerError(const char *ptr_name, const char *text)
Signalee l'utilisation d'un pointeur nul en envoyant une exception.
Int32 Integer
Type représentant un entier.
Structure équivalente à la valeur booléenne vrai.
Structure équivalente à la valeur booléenne vrai.