Arcane  v3.16.6.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#ifdef ARCCORE_OS_MACOS
33# define ARCANE_OS_MACOS
34#endif
35
36#define ARCANE_EXPORT ARCCORE_EXPORT
37#define ARCANE_IMPORT ARCCORE_IMPORT
38#define ARCANE_TEMPLATE_EXPORT ARCCORE_TEMPLATE_EXPORT
39#define ARCANE_RESTRICT ARCCORE_RESTRICT
40
41#define ARCANE_STD std
42
43//Tag var as a voluntary unused variable.
44//Works with any compiler but might be improved by using attribute.
45#define ARCANE_UNUSED(var) ARCCORE_UNUSED(var)
46
47/*---------------------------------------------------------------------------*/
48/*---------------------------------------------------------------------------*/
49
50#if defined(ARCANE_HAS_CUDA) && defined(__CUDACC__)
55#define ARCANE_COMPILING_CUDA
56#endif
57#if defined(ARCANE_HAS_HIP) && defined(__HIP__)
62#define ARCANE_COMPILING_HIP
63#endif
64
65#if defined(ARCANE_HAS_SYCL)
66# if defined(SYCL_LANGUAGE_VERSION) || defined(__ADAPTIVECPP__)
71# define ARCANE_COMPILING_SYCL
72# endif
73#endif
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77// TODO: supprimer l'inclusion de <iosfwd> et les using.
78// Pour l'instant (2022), on supprime ces inclusions uniquement pour Arcane.
79
80#ifndef ARCANE_NO_USING_FOR_STREAM
81#include <iosfwd>
82using std::istream;
83using std::ostream;
84using std::ios;
85using std::ifstream;
86using std::ofstream;
87using std::ostringstream;
88using std::istringstream;
89#endif
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
93
94#ifdef DOXYGEN_DOC
95typedef ARCANE_TYPE_INT16 Int16;
96typedef ARCANE_TYPE_INT32 Int32;
97typedef ARCANE_TYPE_INT64 Int64;
98#endif
99
100#define ARCANE_BEGIN_NAMESPACE namespace Arcane {
101#define ARCANE_END_NAMESPACE }
102#define NUMERICS_BEGIN_NAMESPACE namespace Numerics {
103#define NUMERICS_END_NAMESPACE }
104
105/*---------------------------------------------------------------------------*/
106/*---------------------------------------------------------------------------*/
107
108#ifdef ARCANE_COMPONENT_FULL
109#define ARCANE_COMPONENT_arcane_utils
110#define ARCANE_COMPONENT_arcane
111#define ARCANE_COMPONENT_arcane_mesh
112#define ARCANE_COMPONENT_arcane_std
113#define ARCANE_COMPONENT_arcane_impl
114#define ARCANE_COMPONENT_arcane_script
115#endif
116
117#if defined(ARCANE_COMPONENT_arcane) || defined(ARCANE_COMPONENT_arcane_core)
118#define ARCANE_CORE_EXPORT ARCANE_EXPORT
119#define ARCANE_EXPR_EXPORT ARCANE_EXPORT
120#define ARCANE_DATATYPE_EXPORT ARCANE_EXPORT
121#define ARCANE_CORE_EXTERN_TPL
122#else
123#define ARCANE_CORE_EXPORT ARCANE_IMPORT
124#define ARCANE_EXPR_EXPORT ARCANE_IMPORT
125#define ARCANE_DATATYPE_EXPORT ARCANE_IMPORT
126#define ARCANE_CORE_EXTERN_TPL extern
127#endif
128
129#ifdef ARCANE_COMPONENT_arcane_utils
130#define ARCANE_UTILS_EXPORT ARCANE_EXPORT
131#define ARCANE_UTILS_EXTERN_TPL
132#else
133#define ARCANE_UTILS_EXPORT ARCANE_IMPORT
134#define ARCANE_UTILS_EXTERN_TPL extern
135#endif
136
137#ifdef ARCANE_COMPONENT_arcane_impl
138#define ARCANE_IMPL_EXPORT ARCANE_EXPORT
139#else
140#define ARCANE_IMPL_EXPORT ARCANE_IMPORT
141#endif
142
143#ifdef ARCANE_COMPONENT_arcane_mesh
144#define ARCANE_MESH_EXPORT ARCANE_EXPORT
145#else
146#define ARCANE_MESH_EXPORT ARCANE_IMPORT
147#endif
148
149#ifdef ARCANE_COMPONENT_arcane_std
150#define ARCANE_STD_EXPORT ARCANE_EXPORT
151#else
152#define ARCANE_STD_EXPORT ARCANE_IMPORT
153#endif
154
155#ifdef ARCANE_COMPONENT_arcane_script
156#define ARCANE_SCRIPT_EXPORT ARCANE_EXPORT
157#else
158#define ARCANE_SCRIPT_EXPORT ARCANE_IMPORT
159#endif
160
161#ifdef ARCANE_COMPONENT_arcane_solvers
162#define ARCANE_SOLVERS_EXPORT ARCANE_EXPORT
163#else
164#define ARCANE_SOLVERS_EXPORT ARCANE_IMPORT
165#endif
166
167#ifdef ARCANE_COMPONENT_arcane_geometry
168#define ARCANE_GEOMETRY_EXPORT ARCANE_EXPORT
169#else
170#define ARCANE_GEOMETRY_EXPORT ARCANE_IMPORT
171#endif
172
173#ifdef ARCANE_COMPONENT_arcane_thread
174#define ARCANE_THREAD_EXPORT ARCANE_EXPORT
175#else
176#define ARCANE_THREAD_EXPORT ARCANE_IMPORT
177#endif
178
179#ifdef ARCANE_COMPONENT_arcane_mpi
180#define ARCANE_MPI_EXPORT ARCANE_EXPORT
181#else
182#define ARCANE_MPI_EXPORT ARCANE_IMPORT
183#endif
184
185#ifdef ARCANE_COMPONENT_arcane_hyoda
186#define ARCANE_HYODA_EXPORT ARCANE_EXPORT
187#else
188#define ARCANE_HYODA_EXPORT ARCANE_IMPORT
189#endif
190
191#ifdef ARCANE_REAL_USE_APFLOAT
192#include <apfloat.h>
193#endif
194
195/*---------------------------------------------------------------------------*/
196/*---------------------------------------------------------------------------*/
197
198namespace Arcane
199{
200
201/*---------------------------------------------------------------------------*/
202/*---------------------------------------------------------------------------*/
203
204#define ARCANE_HAS_LONG_LONG
205
206/*---------------------------------------------------------------------------*/
207/*---------------------------------------------------------------------------*/
208
209const double cgrEPSILON_DELTA = 1.0e-2;
210const double cgrPI = 3.14159265358979323846;
211
212/*---------------------------------------------------------------------------*/
213/*---------------------------------------------------------------------------*/
214
215#define ARCANE_REAL(val) ARCCORE_REAL(val)
216
217#ifdef ARCCORE_REAL_NOT_BUILTIN
218# define ARCANE_REAL_NOT_BUILTIN
219#endif
220
221#ifdef ARCCORE_REAL_LONG
222# define ARCANE_REAL_LONG
223#endif
224
225#ifdef ARCCORE_REAL_IS_DOUBLE
226# define ARCANE_REAL_IS_DOUBLE
227#endif
228
237
246
251
271
272/*---------------------------------------------------------------------------*/
273/*---------------------------------------------------------------------------*/
274
276extern "C++" ARCANE_UTILS_EXPORT void
277arcanePrintf(const char*,...);
278
279/*---------------------------------------------------------------------------*/
280/*---------------------------------------------------------------------------*/
281
292extern "C++" ARCANE_UTILS_EXPORT void
293arcaneDebugPause(const char* msg);
294
295/*---------------------------------------------------------------------------*/
296/*---------------------------------------------------------------------------*/
297
298extern "C++" ARCANE_UTILS_EXPORT void
299_internalArcaneMathError(long double arg_value,const char* func_name);
300
301extern "C++" ARCANE_UTILS_EXPORT void
302_internalArcaneMathError(long double arg_value1,long double arg_value2,const char* func_name);
303
304/*---------------------------------------------------------------------------*/
305/*---------------------------------------------------------------------------*/
314ARCCORE_HOST_DEVICE inline void
315arcaneMathError(long double arg_value,const char* func_name)
316{
317#ifndef ARCCORE_DEVICE_CODE
318 _internalArcaneMathError(arg_value,func_name);
319#else
320 ARCANE_UNUSED(arg_value);
321 ARCANE_UNUSED(func_name);
322#endif
323}
324
334ARCCORE_HOST_DEVICE inline void
335arcaneMathError(long double arg_value1,long double arg_value2,const char* func_name)
336{
337#ifndef ARCCORE_DEVICE_CODE
338 _internalArcaneMathError(arg_value1,arg_value2,func_name);
339#else
340 ARCANE_UNUSED(arg_value1);
341 ARCANE_UNUSED(arg_value2);
342 ARCANE_UNUSED(func_name);
343#endif
344}
345
346/*---------------------------------------------------------------------------*/
347/*---------------------------------------------------------------------------*/
358extern "C++" ARCANE_UTILS_EXPORT void
359arcaneNotYetImplemented(const char* file,const char* func,unsigned long line,const char* msg);
360
361/*---------------------------------------------------------------------------*/
362/*---------------------------------------------------------------------------*/
363
365extern "C++" ARCANE_UTILS_EXPORT void
366arcaneDeprecated(const char* file,const char* func,unsigned long line,const char* text);
367
368/*---------------------------------------------------------------------------*/
369/*---------------------------------------------------------------------------*/
370
380extern "C++" ARCANE_UTILS_EXPORT void
381arcaneNoReferenceError(const void* ptr);
382
392extern "C++" ARCANE_UTILS_EXPORT void
394
401extern "C++" ARCANE_UTILS_EXPORT Integer
402arcaneCheckArraySize(unsigned long long size);
403
410extern "C++" ARCANE_UTILS_EXPORT Integer
411arcaneCheckArraySize(long long size);
412
419extern "C++" ARCANE_UTILS_EXPORT Integer
420arcaneCheckArraySize(unsigned long size);
421
428extern "C++" ARCANE_UTILS_EXPORT Integer
429arcaneCheckArraySize(long size);
430
437extern "C++" ARCANE_UTILS_EXPORT Integer
438arcaneCheckArraySize(unsigned int size);
439
446extern "C++" ARCANE_UTILS_EXPORT Integer
447arcaneCheckArraySize(int size);
448
453extern "C++" ARCANE_UTILS_EXPORT void
454arcaneCheckAlignment(const void* ptr,Integer alignment);
455
462extern "C++" ARCANE_UTILS_EXPORT
463bool arcaneIsCheck();
464
472extern "C++" ARCANE_UTILS_EXPORT
473void arcaneSetCheck(bool v);
474
478extern "C++" ARCANE_UTILS_EXPORT
479bool arcaneIsDebug();
480
484extern "C++" ARCANE_UTILS_EXPORT
485bool arcaneHasThread();
486
496extern "C++" ARCANE_UTILS_EXPORT
497void arcaneSetHasThread(bool v);
498
504extern "C++" ARCANE_UTILS_EXPORT
506
507/*---------------------------------------------------------------------------*/
508/*---------------------------------------------------------------------------*/
509
510#ifdef ARCANE_DEBUG
511extern "C++" ARCANE_UTILS_EXPORT bool _checkDebug(size_t);
512#define ARCANE_DEBUGP(a,b) if (_checkDebug(a)) { arcanePrintf b; }
513#else
514#define ARCANE_DEBUGP(a,b)
515#endif
516
517/*---------------------------------------------------------------------------*/
518/*---------------------------------------------------------------------------*/
519
520#ifdef __GNUG__
521# define ARCANE_NOT_YET_IMPLEMENTED(a) \
522{ arcaneNotYetImplemented(__FILE__,__PRETTY_FUNCTION__,__LINE__,(a)); }
523#else
524# define ARCANE_NOT_YET_IMPLEMENTED(a) \
525{ arcaneNotYetImplemented(__FILE__,"(NoInfo)",__LINE__,(a)); }
526#endif
527
528#define ARCANE_DEPRECATED ARCCORE_DEPRECATED
529
530#define ARCANE_DEPRECATED_112 ARCANE_DEPRECATED
531#define ARCANE_DEPRECATED_114 ARCANE_DEPRECATED
532#define ARCANE_DEPRECATED_116 ARCANE_DEPRECATED
533#define ARCANE_DEPRECATED_118 ARCANE_DEPRECATED
534#define ARCANE_DEPRECATED_120 ARCANE_DEPRECATED
535#define ARCANE_DEPRECATED_122 ARCANE_DEPRECATED
536#define ARCANE_DEPRECATED_200 ARCANE_DEPRECATED
537#define ARCANE_DEPRECATED_220 ARCANE_DEPRECATED
538#define ARCANE_DEPRECATED_240 ARCANE_DEPRECATED
539#define ARCANE_DEPRECATED_260 ARCANE_DEPRECATED
540#define ARCANE_DEPRECATED_280 ARCANE_DEPRECATED
541#define ARCANE_DEPRECATED_2018 ARCANE_DEPRECATED
542#define ARCANE_DEPRECATED_2018_R(reason) [[deprecated(reason)]]
543
544#ifndef ARCCORE_DEPRECATED_2021
545#define ARCCORE_DEPRECATED_2021(reason) [[deprecated(reason)]]
546#endif
547
548#define ARCANE_DEPRECATED_REASON(reason) [[deprecated(reason)]]
549
550#ifdef ARCANE_NO_DEPRECATED_LONG_TERM
551#define ARCANE_DEPRECATED_LONG_TERM(reason)
552#else
560#define ARCANE_DEPRECATED_LONG_TERM(reason) [[deprecated(reason)]]
561#endif
562
563// Définir cette macro si on souhaite supprimer de la compilation les
564// méthodes et types obsolètes.
565#define ARCANE_NO_DEPRECATED
566
567// Si la macro est définie, ne notifie pas des méthodes obsolètes des anciennes
568// classes tableaux.
569#ifdef ARCANE_NO_NOTIFY_DEPRECATED_ARRAY
570#define ARCANE_DEPRECATED_ARRAY
571#else
572#define ARCANE_DEPRECATED_ARRAY ARCANE_DEPRECATED
573#endif
574
575/*---------------------------------------------------------------------------*/
576/*---------------------------------------------------------------------------*/
577
578// Les macros suivantes permettent de de créer un identifiant en suffixant
579// le numéro de ligne du fichier. Cela permet d'avoir un identifiant unique
580// pour un fichier et est utilisé par exemple pour générer des noms
581// de variable globale pour l'enregistrement des services.
582// La macro a utiliser est ARCANE_JOIN_WITH_LINE(name).
583#define ARCANE_JOIN_HELPER2(a,b) a ## b
584#define ARCANE_JOIN_HELPER(a,b) ARCANE_JOIN_HELPER2(a,b)
585#define ARCANE_JOIN_WITH_LINE(a) ARCANE_JOIN_HELPER(a,__LINE__)
586
587/*---------------------------------------------------------------------------*/
588/*---------------------------------------------------------------------------*/
589// La macro ARCANE_NORETURN utilise l'attribut [[noreturn]] du C++11 pour
590// indiquer qu'une fonction ne retourne pas.
591#define ARCANE_NORETURN ARCCORE_NORETURN
592
594#define ARCANE_CONSTEXPR ARCCORE_CONSTEXPR
595
596// Le C++11 définit un mot clé 'noexcept' pour indiquer qu'une méthode ne
597// renvoie pas d'exceptions. Malheureusement, comme le support du C++11
598// est fait de manière partielle par les compilateurs, cela ne marche pas
599// pour tous. En particulier, icc 13, 14 et 15 ne supportent pas cela, ni
600// Visual Studio 2013 et antérieurs.
601#define ARCANE_NOEXCEPT ARCCORE_NOEXCEPT
602#define ARCANE_NOEXCEPT_FALSE ARCCORE_NOEXCEPT_FALSE
603
604/*---------------------------------------------------------------------------*/
605/*---------------------------------------------------------------------------*/
606
607// Support pour l'alignement.
608// le C++11 utilise le mot clé alignas pour spécifier l'alignement.
609// Cela fonctionne avec GCC 4.9+ et Visual Studio 2015. Cela ne fonctionne
610// pas avec Visual Studio 2013. Donc pour Visual Studio on utilise dans tous
611// les cas __declspec qui fonctionne toujours. Sous Linux, __attribute__ fonctionne
612// aussi toujours donc on utilise cela. A noter que les structures Simd ont besoin
613// de l'attribut 'packed' qui n'existe que avec GCC et Intel. Il ne semble pas y avoir
614// d'équivalent avec MSVC.
615#ifdef _MSC_VER
617# define ARCANE_ALIGNAS(value) __declspec(align(value))
619# define ARCANE_ALIGNAS_PACKED(value) __declspec(align(value))
620#else
622# define ARCANE_ALIGNAS_PACKED(value) __attribute__ ((aligned (value),packed))
624# define ARCANE_ALIGNAS(value) __attribute__ ((aligned (value)))
625#endif
626
627/*---------------------------------------------------------------------------*/
628/*---------------------------------------------------------------------------*/
629
630#ifdef ARCANE_SWIG
631#ifdef ARCANE_DEPRECATED
632#undef ARCANE_DEPRECATED
633#endif
634#endif
635
636/*---------------------------------------------------------------------------*/
637/*---------------------------------------------------------------------------*/
638
639#if defined(ARCANE_CHECK) || defined(ARCANE_DEBUG)
640#ifndef ARCANE_DEBUG_ASSERT
641#define ARCANE_DEBUG_ASSERT
642#endif
643#endif
644
645/*---------------------------------------------------------------------------*/
646/*---------------------------------------------------------------------------*/
654extern "C++" ARCANE_UTILS_EXPORT void
655arcaneNullPointerError [[noreturn]] ();
656
657/*---------------------------------------------------------------------------*/
658/*---------------------------------------------------------------------------*/
670extern "C++" ARCANE_UTILS_EXPORT void
671arcaneThrowNullPointerError [[noreturn]] (const char* ptr_name,const char* text);
672
673/*---------------------------------------------------------------------------*/
674/*---------------------------------------------------------------------------*/
678static inline void
679arcaneCheckNull(const void* ptr)
680{
681 if (!ptr)
683}
684
685/*---------------------------------------------------------------------------*/
686/*---------------------------------------------------------------------------*/
695static const Integer SIMD_PADDING_SIZE = 8;
696
697/*---------------------------------------------------------------------------*/
698/*---------------------------------------------------------------------------*/
707extern "C++" ARCANE_UTILS_EXPORT Integer
709
710/*---------------------------------------------------------------------------*/
711/*---------------------------------------------------------------------------*/
712
713/*
714 * Macros utilisées pour le débug.
715 */
716#ifdef ARCANE_DEBUG_ASSERT
717extern "C++" ARCANE_UTILS_EXPORT void _doAssert(const char*,const char*,const char*,size_t);
718template<typename T> inline T*
719_checkPointer(T* t,const char* file,const char* func,size_t line)
720{
721 if (!t){
722 _doAssert("ARCANE_ASSERT",file,func,line);
723 arcanePrintf("Bad Pointer");
724 }
725 return t;
726}
727# ifdef __GNUG__
728# define ARCANE_D_WHERE(a) Arcane::_doAssert(a,__FILE__,__PRETTY_FUNCTION__,__LINE__)
729# define ARCANE_DCHECK_POINTER(a) Arcane::_checkPointer((a),__FILE__,__PRETTY_FUNCTION__,__LINE__);
730# else
731# define ARCANE_D_WHERE(a) Arcane::_doAssert(a,__FILE__,"(NoInfo)",__LINE__)
732# define ARCANE_DCHECK_POINTER(a) Arcane::_checkPointer((a),__FILE__,"(NoInfo"),__LINE__);
733# endif
734# define ARCANE_CHECK_PTR(a) \
735 {if (!(a)){Arcane::arcanePrintf("Null value");ARCANE_D_WHERE("ARCANE_ASSERT");}}
736
737# define ARCANE_ASSERT(a,b) \
738 {if (!(a)){ Arcane::arcanePrintf("Assertion '%s' fails:",#a); Arcane::arcanePrintf b; ARCANE_D_WHERE("ARCANE_ASSERT");}}
739# define ARCANE_WARNING(a) \
740 { Arcane::arcanePrintf a; ARCANE_D_WHERE("ARCANE_WARNING"); }
741#else
742# define ARCANE_CHECK_PTR(a)
743# define ARCANE_ASSERT(a,b)
744# define ARCANE_WARNING(a)
745# define ARCANE_DCHECK_POINTER(a) (a);
746#endif
747
748/*---------------------------------------------------------------------------*/
749/*---------------------------------------------------------------------------*/
757#define ARCANE_THROW(exception_class,...) \
758 throw exception_class (A_FUNCINFO,Arcane::String::format(__VA_ARGS__))
759
760/*---------------------------------------------------------------------------*/
761/*---------------------------------------------------------------------------*/
768#define ARCANE_FATAL(...)\
769 throw Arcane::FatalErrorException(A_FUNCINFO,Arcane::String::format(__VA_ARGS__))
770
771/*---------------------------------------------------------------------------*/
772/*---------------------------------------------------------------------------*/
779static inline void*
780arcaneThrowIfNull(void* ptr,const char* ptr_name,const char* text)
781{
782 if (!ptr)
783 arcaneThrowNullPointerError(ptr_name,text);
784 return ptr;
785}
786
787/*---------------------------------------------------------------------------*/
788/*---------------------------------------------------------------------------*/
795static inline const void*
796arcaneThrowIfNull(const void* ptr,const char* ptr_name,const char* text)
797{
798 if (!ptr)
799 arcaneThrowNullPointerError(ptr_name,text);
800 return ptr;
801}
802
803/*---------------------------------------------------------------------------*/
804/*---------------------------------------------------------------------------*/
811template<typename T> inline T*
812arcaneThrowIfNull(T* ptr,const char* ptr_name,const char* text)
813{
814 if (!ptr)
815 arcaneThrowNullPointerError(ptr_name,text);
816 return ptr;
817}
818
819/*---------------------------------------------------------------------------*/
820/*---------------------------------------------------------------------------*/
827#define ARCANE_CHECK_POINTER(ptr) \
828 arcaneThrowIfNull(ptr,#ptr,nullptr)
829
836#define ARCANE_CHECK_POINTER2(ptr,text)\
837 arcaneThrowIfNull(ptr,#ptr,text)
838
839/*---------------------------------------------------------------------------*/
840/*---------------------------------------------------------------------------*/
850extern "C++" ARCANE_UTILS_EXPORT void
851arcaneRangeError [[noreturn]] (Int64 i,Int64 max_size);
852
856static inline constexpr ARCCORE_HOST_DEVICE void
857arcaneCheckAt(Int64 i,Int64 max_size)
858{
859#ifndef ARCCORE_DEVICE_CODE
860 if (i<0 || i>=max_size)
861 arcaneRangeError(i,max_size);
862#else
863 ARCANE_UNUSED(i);
864 ARCANE_UNUSED(max_size);
865#endif
866}
867
868#if defined(ARCANE_CHECK) || defined(ARCANE_DEBUG)
869#define ARCANE_CHECK_AT(a,b) ::Arcane::arcaneCheckAt((a),(b))
870#else
871#define ARCANE_CHECK_AT(a,b)
872#endif
873
874/*---------------------------------------------------------------------------*/
875/*---------------------------------------------------------------------------*/
876
877} // End namespace Arcane
878
879/*---------------------------------------------------------------------------*/
880/*---------------------------------------------------------------------------*/
881
882#endif
-*- 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
Int64 UniqueIdType
Type des entiers utilisés pour stocker les identifiants uniques (globaux) des entités.
std::int64_t Int64
Type entier signé sur 64 bits.
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.
Int32 Integer
Type représentant un entier.
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
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
__host__ __device__ void arcaneMathError(long double arg_value, const char *func_name)
Signale un argument invalide d'une fonction mathématique.
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
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...
std::int32_t Int32
Type entier signé sur 32 bits.
void arcaneThrowNullPointerError(const char *ptr_name, const char *text)
Signalee l'utilisation d'un pointeur nul en envoyant une exception.