Arcane  v4.1.1.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// TODO: supprimer l'inclusion de <iosfwd> et les using.
50// Pour l'instant (2022), on supprime ces inclusions uniquement pour Arcane.
51
52#ifndef ARCANE_NO_USING_FOR_STREAM
53#include <iosfwd>
54using std::istream;
55using std::ostream;
56using std::ios;
57using std::ifstream;
58using std::ofstream;
59using std::ostringstream;
60using std::istringstream;
61#endif
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66#ifdef DOXYGEN_DOC
67typedef ARCANE_TYPE_INT16 Int16;
68typedef ARCANE_TYPE_INT32 Int32;
69typedef ARCANE_TYPE_INT64 Int64;
70#endif
71
72#define ARCANE_BEGIN_NAMESPACE namespace Arcane {
73#define ARCANE_END_NAMESPACE }
74#define NUMERICS_BEGIN_NAMESPACE namespace Numerics {
75#define NUMERICS_END_NAMESPACE }
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80#ifdef ARCANE_COMPONENT_FULL
81#define ARCANE_COMPONENT_arcane_utils
82#define ARCANE_COMPONENT_arcane
83#define ARCANE_COMPONENT_arcane_mesh
84#define ARCANE_COMPONENT_arcane_std
85#define ARCANE_COMPONENT_arcane_impl
86#define ARCANE_COMPONENT_arcane_script
87#endif
88
89#if defined(ARCANE_COMPONENT_arcane) || defined(ARCANE_COMPONENT_arcane_core)
90#define ARCANE_CORE_EXPORT ARCANE_EXPORT
91#define ARCANE_EXPR_EXPORT ARCANE_EXPORT
92#define ARCANE_DATATYPE_EXPORT ARCANE_EXPORT
93#define ARCANE_CORE_EXTERN_TPL
94#else
95#define ARCANE_CORE_EXPORT ARCANE_IMPORT
96#define ARCANE_EXPR_EXPORT ARCANE_IMPORT
97#define ARCANE_DATATYPE_EXPORT ARCANE_IMPORT
98#define ARCANE_CORE_EXTERN_TPL extern
99#endif
100
101#ifdef ARCANE_COMPONENT_arcane_utils
102#define ARCANE_UTILS_EXPORT ARCANE_EXPORT
103#define ARCANE_UTILS_EXTERN_TPL
104#else
105#define ARCANE_UTILS_EXPORT ARCANE_IMPORT
106#define ARCANE_UTILS_EXTERN_TPL extern
107#endif
108
109#ifdef ARCANE_COMPONENT_arcane_impl
110#define ARCANE_IMPL_EXPORT ARCANE_EXPORT
111#else
112#define ARCANE_IMPL_EXPORT ARCANE_IMPORT
113#endif
114
115#ifdef ARCANE_COMPONENT_arcane_mesh
116#define ARCANE_MESH_EXPORT ARCANE_EXPORT
117#else
118#define ARCANE_MESH_EXPORT ARCANE_IMPORT
119#endif
120
121#ifdef ARCANE_COMPONENT_arcane_std
122#define ARCANE_STD_EXPORT ARCANE_EXPORT
123#else
124#define ARCANE_STD_EXPORT ARCANE_IMPORT
125#endif
126
127#ifdef ARCANE_COMPONENT_arcane_script
128#define ARCANE_SCRIPT_EXPORT ARCANE_EXPORT
129#else
130#define ARCANE_SCRIPT_EXPORT ARCANE_IMPORT
131#endif
132
133#ifdef ARCANE_COMPONENT_arcane_solvers
134#define ARCANE_SOLVERS_EXPORT ARCANE_EXPORT
135#else
136#define ARCANE_SOLVERS_EXPORT ARCANE_IMPORT
137#endif
138
139#ifdef ARCANE_COMPONENT_arcane_geometry
140#define ARCANE_GEOMETRY_EXPORT ARCANE_EXPORT
141#else
142#define ARCANE_GEOMETRY_EXPORT ARCANE_IMPORT
143#endif
144
145#ifdef ARCANE_COMPONENT_arcane_thread
146#define ARCANE_THREAD_EXPORT ARCANE_EXPORT
147#else
148#define ARCANE_THREAD_EXPORT ARCANE_IMPORT
149#endif
150
151#ifdef ARCANE_COMPONENT_arcane_mpi
152#define ARCANE_MPI_EXPORT ARCANE_EXPORT
153#else
154#define ARCANE_MPI_EXPORT ARCANE_IMPORT
155#endif
156
157#ifdef ARCANE_COMPONENT_arcane_hyoda
158#define ARCANE_HYODA_EXPORT ARCANE_EXPORT
159#else
160#define ARCANE_HYODA_EXPORT ARCANE_IMPORT
161#endif
162
163#ifdef ARCANE_REAL_USE_APFLOAT
164#include <apfloat.h>
165#endif
166
167/*---------------------------------------------------------------------------*/
168/*---------------------------------------------------------------------------*/
169
170namespace Arcane
171{
172
173/*---------------------------------------------------------------------------*/
174/*---------------------------------------------------------------------------*/
175
176#define ARCANE_HAS_LONG_LONG
177
178/*---------------------------------------------------------------------------*/
179/*---------------------------------------------------------------------------*/
180
181const double cgrEPSILON_DELTA = 1.0e-2;
182const double cgrPI = 3.14159265358979323846;
183
184/*---------------------------------------------------------------------------*/
185/*---------------------------------------------------------------------------*/
186
187#define ARCANE_REAL(val) ARCCORE_REAL(val)
188
189#ifdef ARCCORE_REAL_NOT_BUILTIN
190# define ARCANE_REAL_NOT_BUILTIN
191#endif
192
193#ifdef ARCCORE_REAL_LONG
194# define ARCANE_REAL_LONG
195#endif
196
197#ifdef ARCCORE_REAL_IS_DOUBLE
198# define ARCANE_REAL_IS_DOUBLE
199#endif
200
209
218
223
243
244/*---------------------------------------------------------------------------*/
245/*---------------------------------------------------------------------------*/
246
248extern "C++" ARCANE_UTILS_EXPORT void
249arcanePrintf(const char*,...);
250
251/*---------------------------------------------------------------------------*/
252/*---------------------------------------------------------------------------*/
253
264extern "C++" ARCANE_UTILS_EXPORT void
265arcaneDebugPause(const char* msg);
266
267/*---------------------------------------------------------------------------*/
268/*---------------------------------------------------------------------------*/
269
270extern "C++" ARCANE_UTILS_EXPORT void
271_internalArcaneMathError(long double arg_value,const char* func_name);
272
273extern "C++" ARCANE_UTILS_EXPORT void
274_internalArcaneMathError(long double arg_value1,long double arg_value2,const char* func_name);
275
276/*---------------------------------------------------------------------------*/
277/*---------------------------------------------------------------------------*/
286ARCCORE_HOST_DEVICE inline void
287arcaneMathError(long double arg_value,const char* func_name)
288{
289#ifndef ARCCORE_DEVICE_CODE
290 _internalArcaneMathError(arg_value,func_name);
291#else
292 ARCANE_UNUSED(arg_value);
293 ARCANE_UNUSED(func_name);
294#endif
295}
296
306ARCCORE_HOST_DEVICE inline void
307arcaneMathError(long double arg_value1,long double arg_value2,const char* func_name)
308{
309#ifndef ARCCORE_DEVICE_CODE
310 _internalArcaneMathError(arg_value1,arg_value2,func_name);
311#else
312 ARCANE_UNUSED(arg_value1);
313 ARCANE_UNUSED(arg_value2);
314 ARCANE_UNUSED(func_name);
315#endif
316}
317
318/*---------------------------------------------------------------------------*/
319/*---------------------------------------------------------------------------*/
330extern "C++" ARCANE_UTILS_EXPORT void
331arcaneNotYetImplemented(const char* file,const char* func,unsigned long line,const char* msg);
332
333/*---------------------------------------------------------------------------*/
334/*---------------------------------------------------------------------------*/
335
337extern "C++" ARCANE_UTILS_EXPORT void
338arcaneDeprecated(const char* file,const char* func,unsigned long line,const char* text);
339
340/*---------------------------------------------------------------------------*/
341/*---------------------------------------------------------------------------*/
342
352extern "C++" ARCANE_UTILS_EXPORT void
353arcaneNoReferenceError(const void* ptr);
354
364extern "C++" ARCANE_UTILS_EXPORT void
366
373extern "C++" ARCANE_UTILS_EXPORT Integer
374arcaneCheckArraySize(unsigned long long size);
375
382extern "C++" ARCANE_UTILS_EXPORT Integer
383arcaneCheckArraySize(long long size);
384
391extern "C++" ARCANE_UTILS_EXPORT Integer
392arcaneCheckArraySize(unsigned long size);
393
400extern "C++" ARCANE_UTILS_EXPORT Integer
401arcaneCheckArraySize(long size);
402
409extern "C++" ARCANE_UTILS_EXPORT Integer
410arcaneCheckArraySize(unsigned int size);
411
418extern "C++" ARCANE_UTILS_EXPORT Integer
419arcaneCheckArraySize(int size);
420
425extern "C++" ARCANE_UTILS_EXPORT void
426arcaneCheckAlignment(const void* ptr,Integer alignment);
427
434extern "C++" ARCANE_UTILS_EXPORT
435bool arcaneIsCheck();
436
444extern "C++" ARCANE_UTILS_EXPORT
445void arcaneSetCheck(bool v);
446
450extern "C++" ARCANE_UTILS_EXPORT
451bool arcaneIsDebug();
452
456extern "C++" ARCANE_UTILS_EXPORT
457bool arcaneHasThread();
458
468extern "C++" ARCANE_UTILS_EXPORT
469void arcaneSetHasThread(bool v);
470
476extern "C++" ARCANE_UTILS_EXPORT
478
479/*---------------------------------------------------------------------------*/
480/*---------------------------------------------------------------------------*/
481
482#ifdef ARCANE_DEBUG
483extern "C++" ARCANE_UTILS_EXPORT bool _checkDebug(size_t);
484#define ARCANE_DEBUGP(a,b) if (_checkDebug(a)) { arcanePrintf b; }
485#else
486#define ARCANE_DEBUGP(a,b)
487#endif
488
489/*---------------------------------------------------------------------------*/
490/*---------------------------------------------------------------------------*/
491
492#ifdef __GNUG__
493# define ARCANE_NOT_YET_IMPLEMENTED(a) \
494{ arcaneNotYetImplemented(__FILE__,__PRETTY_FUNCTION__,__LINE__,(a)); }
495#else
496# define ARCANE_NOT_YET_IMPLEMENTED(a) \
497{ arcaneNotYetImplemented(__FILE__,"(NoInfo)",__LINE__,(a)); }
498#endif
499
500#define ARCANE_DEPRECATED ARCCORE_DEPRECATED
501
502#define ARCANE_DEPRECATED_112 ARCANE_DEPRECATED
503#define ARCANE_DEPRECATED_114 ARCANE_DEPRECATED
504#define ARCANE_DEPRECATED_116 ARCANE_DEPRECATED
505#define ARCANE_DEPRECATED_118 ARCANE_DEPRECATED
506#define ARCANE_DEPRECATED_120 ARCANE_DEPRECATED
507#define ARCANE_DEPRECATED_122 ARCANE_DEPRECATED
508#define ARCANE_DEPRECATED_200 ARCANE_DEPRECATED
509#define ARCANE_DEPRECATED_220 ARCANE_DEPRECATED
510#define ARCANE_DEPRECATED_240 ARCANE_DEPRECATED
511#define ARCANE_DEPRECATED_260 ARCANE_DEPRECATED
512#define ARCANE_DEPRECATED_280 ARCANE_DEPRECATED
513#define ARCANE_DEPRECATED_2018 ARCANE_DEPRECATED
514#define ARCANE_DEPRECATED_2018_R(reason) [[deprecated(reason)]]
515
516#ifndef ARCCORE_DEPRECATED_2021
517#define ARCCORE_DEPRECATED_2021(reason) [[deprecated(reason)]]
518#endif
519
520#define ARCANE_DEPRECATED_REASON(reason) [[deprecated(reason)]]
521
522#ifdef ARCANE_NO_DEPRECATED_LONG_TERM
523#define ARCANE_DEPRECATED_LONG_TERM(reason)
524#else
532#define ARCANE_DEPRECATED_LONG_TERM(reason) [[deprecated(reason)]]
533#endif
534
535// Définir cette macro si on souhaite supprimer de la compilation les
536// méthodes et types obsolètes.
537#define ARCANE_NO_DEPRECATED
538
539// Si la macro est définie, ne notifie pas des méthodes obsolètes des anciennes
540// classes tableaux.
541#ifdef ARCANE_NO_NOTIFY_DEPRECATED_ARRAY
542#define ARCANE_DEPRECATED_ARRAY
543#else
544#define ARCANE_DEPRECATED_ARRAY ARCANE_DEPRECATED
545#endif
546
547/*---------------------------------------------------------------------------*/
548/*---------------------------------------------------------------------------*/
549
550// Les macros suivantes permettent de de créer un identifiant en suffixant
551// le numéro de ligne du fichier. Cela permet d'avoir un identifiant unique
552// pour un fichier et est utilisé par exemple pour générer des noms
553// de variable globale pour l'enregistrement des services.
554// La macro a utiliser est ARCANE_JOIN_WITH_LINE(name).
555#define ARCANE_JOIN_HELPER2(a,b) a ## b
556#define ARCANE_JOIN_HELPER(a,b) ARCANE_JOIN_HELPER2(a,b)
557#define ARCANE_JOIN_WITH_LINE(a) ARCANE_JOIN_HELPER(a,__LINE__)
558
559/*---------------------------------------------------------------------------*/
560/*---------------------------------------------------------------------------*/
561// La macro ARCANE_NORETURN utilise l'attribut [[noreturn]] du C++11 pour
562// indiquer qu'une fonction ne retourne pas.
563#define ARCANE_NORETURN ARCCORE_NORETURN
564
566#define ARCANE_CONSTEXPR ARCCORE_CONSTEXPR
567
568// Le C++11 définit un mot clé 'noexcept' pour indiquer qu'une méthode ne
569// renvoie pas d'exceptions. Malheureusement, comme le support du C++11
570// est fait de manière partielle par les compilateurs, cela ne marche pas
571// pour tous. En particulier, icc 13, 14 et 15 ne supportent pas cela, ni
572// Visual Studio 2013 et antérieurs.
573#define ARCANE_NOEXCEPT ARCCORE_NOEXCEPT
574#define ARCANE_NOEXCEPT_FALSE ARCCORE_NOEXCEPT_FALSE
575
576/*---------------------------------------------------------------------------*/
577/*---------------------------------------------------------------------------*/
578
579// Support pour l'alignement.
580// le C++11 utilise le mot clé alignas pour spécifier l'alignement.
581// Cela fonctionne avec GCC 4.9+ et Visual Studio 2015. Cela ne fonctionne
582// pas avec Visual Studio 2013. Donc pour Visual Studio on utilise dans tous
583// les cas __declspec qui fonctionne toujours. Sous Linux, __attribute__ fonctionne
584// aussi toujours donc on utilise cela. A noter que les structures Simd ont besoin
585// de l'attribut 'packed' qui n'existe que avec GCC et Intel. Il ne semble pas y avoir
586// d'équivalent avec MSVC.
587#ifdef _MSC_VER
589# define ARCANE_ALIGNAS(value) __declspec(align(value))
591# define ARCANE_ALIGNAS_PACKED(value) __declspec(align(value))
592#else
594# define ARCANE_ALIGNAS_PACKED(value) __attribute__ ((aligned (value),packed))
596# define ARCANE_ALIGNAS(value) __attribute__ ((aligned (value)))
597#endif
598
599/*---------------------------------------------------------------------------*/
600/*---------------------------------------------------------------------------*/
601
602#ifdef ARCANE_SWIG
603#ifdef ARCANE_DEPRECATED
604#undef ARCANE_DEPRECATED
605#endif
606#endif
607
608/*---------------------------------------------------------------------------*/
609/*---------------------------------------------------------------------------*/
610
611#if defined(ARCANE_CHECK) || defined(ARCANE_DEBUG)
612#ifndef ARCANE_DEBUG_ASSERT
613#define ARCANE_DEBUG_ASSERT
614#endif
615#endif
616
617/*---------------------------------------------------------------------------*/
618/*---------------------------------------------------------------------------*/
626extern "C++" ARCANE_UTILS_EXPORT void
627arcaneNullPointerError [[noreturn]] ();
628
629/*---------------------------------------------------------------------------*/
630/*---------------------------------------------------------------------------*/
642extern "C++" ARCANE_UTILS_EXPORT void
643arcaneThrowNullPointerError [[noreturn]] (const char* ptr_name,const char* text);
644
645/*---------------------------------------------------------------------------*/
646/*---------------------------------------------------------------------------*/
650static inline void
651arcaneCheckNull(const void* ptr)
652{
653 if (!ptr)
655}
656
657/*---------------------------------------------------------------------------*/
658/*---------------------------------------------------------------------------*/
667extern "C++" ARCANE_UTILS_EXPORT Integer
669
670/*---------------------------------------------------------------------------*/
671/*---------------------------------------------------------------------------*/
672
673/*
674 * Macros utilisées pour le débug.
675 */
676#ifdef ARCANE_DEBUG_ASSERT
677extern "C++" ARCANE_UTILS_EXPORT void _doAssert(const char*,const char*,const char*,size_t);
678template<typename T> inline T*
679_checkPointer(T* t,const char* file,const char* func,size_t line)
680{
681 if (!t){
682 _doAssert("ARCANE_ASSERT",file,func,line);
683 arcanePrintf("Bad Pointer");
684 }
685 return t;
686}
687# ifdef __GNUG__
688# define ARCANE_D_WHERE(a) Arcane::_doAssert(a,__FILE__,__PRETTY_FUNCTION__,__LINE__)
689# define ARCANE_DCHECK_POINTER(a) Arcane::_checkPointer((a),__FILE__,__PRETTY_FUNCTION__,__LINE__);
690# else
691# define ARCANE_D_WHERE(a) Arcane::_doAssert(a,__FILE__,"(NoInfo)",__LINE__)
692# define ARCANE_DCHECK_POINTER(a) Arcane::_checkPointer((a),__FILE__,"(NoInfo"),__LINE__);
693# endif
694# define ARCANE_CHECK_PTR(a) \
695 {if (!(a)){Arcane::arcanePrintf("Null value");ARCANE_D_WHERE("ARCANE_ASSERT");}}
696
697# define ARCANE_ASSERT(a,b) \
698 {if (!(a)){ Arcane::arcanePrintf("Assertion '%s' fails:",#a); Arcane::arcanePrintf b; ARCANE_D_WHERE("ARCANE_ASSERT");}}
699# define ARCANE_WARNING(a) \
700 { Arcane::arcanePrintf a; ARCANE_D_WHERE("ARCANE_WARNING"); }
701#else
702# define ARCANE_CHECK_PTR(a)
703# define ARCANE_ASSERT(a,b)
704# define ARCANE_WARNING(a)
705# define ARCANE_DCHECK_POINTER(a) (a);
706#endif
707
708/*---------------------------------------------------------------------------*/
709/*---------------------------------------------------------------------------*/
717#define ARCANE_THROW(exception_class,...) \
718 ARCCORE_THROW(exception_class,__VA_ARGS__)
719
729#define ARCANE_THROW_IF(const, exception_class, ...) \
730 ARCCORE_THROW_IF(const, exception_class, __VA_ARGS__)
731
732/*---------------------------------------------------------------------------*/
733/*---------------------------------------------------------------------------*/
740#define ARCANE_FATAL(...) \
741 ARCCORE_FATAL(__VA_ARGS__)
742
751#define ARCANE_FATAL_IF(const, ...) \
752 ARCCORE_FATAL_IF(const, __VA_ARGS__)
753
754/*---------------------------------------------------------------------------*/
755/*---------------------------------------------------------------------------*/
762static inline void*
763arcaneThrowIfNull(void* ptr,const char* ptr_name,const char* text)
764{
765 if (!ptr)
766 arcaneThrowNullPointerError(ptr_name,text);
767 return ptr;
768}
769
770/*---------------------------------------------------------------------------*/
771/*---------------------------------------------------------------------------*/
778static inline const void*
779arcaneThrowIfNull(const void* ptr,const char* ptr_name,const char* text)
780{
781 if (!ptr)
782 arcaneThrowNullPointerError(ptr_name,text);
783 return ptr;
784}
785
786/*---------------------------------------------------------------------------*/
787/*---------------------------------------------------------------------------*/
794template<typename T> inline T*
795arcaneThrowIfNull(T* ptr,const char* ptr_name,const char* text)
796{
797 if (!ptr)
798 arcaneThrowNullPointerError(ptr_name,text);
799 return ptr;
800}
801
802/*---------------------------------------------------------------------------*/
803/*---------------------------------------------------------------------------*/
810#define ARCANE_CHECK_POINTER(ptr) \
811 arcaneThrowIfNull(ptr,#ptr,nullptr)
812
819#define ARCANE_CHECK_POINTER2(ptr,text)\
820 arcaneThrowIfNull(ptr,#ptr,text)
821
822/*---------------------------------------------------------------------------*/
823/*---------------------------------------------------------------------------*/
833extern "C++" ARCANE_UTILS_EXPORT void
834arcaneRangeError [[noreturn]] (Int64 i,Int64 max_size);
835
839static inline constexpr ARCCORE_HOST_DEVICE void
840arcaneCheckAt(Int64 i,Int64 max_size)
841{
842#ifndef ARCCORE_DEVICE_CODE
843 if (i<0 || i>=max_size)
844 arcaneRangeError(i,max_size);
845#else
846 ARCANE_UNUSED(i);
847 ARCANE_UNUSED(max_size);
848#endif
849}
850
851#if defined(ARCANE_CHECK) || defined(ARCANE_DEBUG)
852#define ARCANE_CHECK_AT(a,b) ::Arcane::arcaneCheckAt((a),(b))
853#else
854#define ARCANE_CHECK_AT(a,b)
855#endif
856
857/*---------------------------------------------------------------------------*/
858/*---------------------------------------------------------------------------*/
859
860} // End namespace Arcane
861
862/*---------------------------------------------------------------------------*/
863/*---------------------------------------------------------------------------*/
864
865#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.