Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ArccoreGlobal.h File Reference

Definitions and globals of Arccore. More...

#include <cstdint>
#include "arccore/arccore_config.h"
Include dependency graph for ArccoreGlobal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Arcane::APReal
 Emulation of real number in arbitrary precision. More...
struct  Arcane::TrueType
struct  Arcane::FalseType
class  Arccore::ITraceMng
 Trace manager interface. More...
class  Arccore::String
 Unicode character string. More...
class  Arccore::StringBuilder
 Unicode character string constructor. More...
class  Arccore::StringFormatterArg
class  Arccore::StringView
 View of a UTF-8 character string. More...
class  Arccore::APReal
 Emulation of real number in arbitrary precision. More...
struct  Arccore::FalseType
struct  Arccore::TrueType

Namespaces

namespace  Arcane
 -- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
namespace  Arccore
 Namespace of Arccore.

Macros

#define ARCCORE_EXPORT   __attribute__((visibility("default")))
#define ARCCORE_IMPORT   __attribute__((visibility("default")))
#define ARCCORE_TEMPLATE_EXPORT   ARCCORE_EXPORT
#define ARCCORE_RESTRICT
#define ARCCORE_STD   std
#define ARCCORE_UNUSED(var)
#define ARCCORE_DEVICE
#define ARCCORE_BASE_EXPORT   ARCCORE_IMPORT
#define ARCCORE_BASE_EXTERN_TPL   extern
#define ARCCORE_REAL(val)
#define ARCCORE_REAL_IS_DOUBLE
#define ARCCORE_INTEGER_MAX   ARCCORE_INT32_MAX
 Macro indicating the maximum value that the #Integer type can take.
#define ARCCORE_DEPRECATED_2017   ARCCORE_DEPRECATED
#define ARCCORE_DEPRECATED_2018   ARCCORE_DEPRECATED
#define ARCCORE_DEPRECATED_2019(reason)
#define ARCCORE_DEPRECATED_2020(reason)
#define ARCCORE_DEPRECATED_REASON(reason)
#define ARCCORE_NO_DEPRECATED
#define ARCCORE_DEPRECATED
#define ARCCORE_NORETURN   [[noreturn]]
#define ARCCORE_CONSTEXPR   constexpr
 Macro allowing specification of the C++11 'constexpr' keyword.
#define ARCCORE_NOEXCEPT   noexcept
#define ARCCORE_NOEXCEPT_FALSE   noexcept(false)
#define ARCCORE_NO_UNIQUE_ADDRESS   [[no_unique_address]]
#define ARCCORE_ALIGNAS_PACKED(value)
 Macro to guarantee the packing and alignment of a class to value bytes.
#define ARCCORE_ALIGNAS(value)
 Macro to guarantee the alignment of a class to value bytes.
#define ARCCORE_THROW(exception_class, ...)
 Macro to throw an exception with formatting.
#define ARCCORE_THROW_IF(cond, exception_class, ...)
 Macro to throw an exception with formatting if cond is true.
#define ARCCORE_FATAL(...)
 Macro throwing a FatalErrorException.
#define ARCCORE_FATAL_IF(cond, ...)
 Macro throwing a FatalErrorException if cond is true.
#define ARCCORE_CHECK_AT(a, b)
#define ARCCORE_CHECK_RANGE(a, b, c)
#define ARCCORE_CHECK_AT2(a0, a1, b0, b1)
#define ARCCORE_CHECK_AT3(a0, a1, a2, b0, b1, b2)
#define ARCCORE_CHECK_AT4(a0, a1, a2, a3, b0, b1, b2, b3)
#define ARCCORE_CAST_SMALL_SIZE(a)
#define ARCCORE_MACRO_FUNCTION_NAME   __func__
#define ARCCORE_CHECK_PTR(a)
#define ARCCORE_ASSERT(a, b)
#define ARCCORE_WARNING(a)
#define ARCCORE_DCHECK_POINTER(a)
#define ARCCORE_CHECK_POINTER(ptr)
 Macro that returns the pointer ptr if it is not null or throws an exception if it is null.
#define ARCCORE_CHECK_POINTER2(ptr, text)
 Macro that returns the pointer ptr if it is not null or throws an exception if it is null.
#define ARCCORE_JOIN_HELPER2(a, b)
#define ARCCORE_JOIN_HELPER(a, b)
#define ARCCORE_JOIN_WITH_LINE(a)

Typedefs

typedef ARCCORE_TYPE_INT16 Int16
typedef ARCCORE_TYPE_INT32 Int32
typedef ARCCORE_TYPE_INT64 Int64
using Arcane::Int8 = std::int8_t
 Signed integer type of 8 bits.
using Arcane::Int16 = std::int16_t
 Signed integer type of 16 bits.
using Arcane::Int32 = std::int32_t
 Signed integer type of 32 bits.
using Arcane::Int64 = std::int64_t
 Signed integer type of 64 bits.
using Arcane::UInt32 = std::uint32_t
 Unsigned integer type of 32 bits.
using Arcane::UInt64 = std::uint64_t
 Unsigned integer type of 64 bits.
using Arcane::Pointer = void*
 Type representing a pointer.
using Arcane::Real = double
 Type representing a real number.
using Arcane::Short = Int32
using Arcane::Integer = Int32
 Type representing an integer.
using Arcane::Float32 = float
 IEEE-753 single-precision floating-point type.
using Arccore::BFloat16 = Arcane::BFloat16
 Type 'Brain Float16'.
using Arccore::Float16 = Arcane::Float16
 Type 'Float16' (binary16).
using Arccore::Float32 = float
 IEEE-753 single precision floating point type (binary32).
using Arccore::Int8 = Arcane::Int8
 Type representing an 8-bit integer.
using Arccore::Float128 = Arcane::Float128
 Type representing a 128-bit float.
using Arccore::Int128 = Arcane::Int128
 Type representing a 128-bit integer.
using Arccore::Int16 = Arcane::Int16
using Arccore::Int32 = Arcane::Int32
using Arccore::Int64 = Arcane::Int64
using Arccore::UInt32
 Unsigned integer type of 32 bits.
using Arccore::UInt64
 Unsigned integer type of 64 bits.
using Arccore::Integer
 Type representing an integer.
using Arccore::Pointer
 Type representing a pointer.
using Arccore::Real
 Type representing a real number.
using Arccore::Short

Functions

bool Arcane::arccoreIsCheck ()
 True if in check mode.
void Arcane::arccoreSetCheck (bool v)
 Activates or deactivates check mode.
bool Arcane::arccoreIsDebug ()
 True if the ARCCORE_DEBUG macro is defined.
void Arcane::arccorePrintf (const char *,...)
 Encapsulation of the C printf function.
void Arcane::arccoreDebugPause (const char *msg)
 Enters pause mode or throws a fatal error.
void Arcane::arccoreSetPauseOnError (bool v)
 Indicates whether calling arccoreDebugPause() results in a pause.
void Arcane::arccoreNullPointerError ()
 Signals the use of a null pointer.
void Arcane::arccoreRangeError (Int64 i, Int64 min_value_inclusive, Int64 max_value_exclusive)
 Signals that a value is not within the desired range.
void Arcane::arccoreRangeError (Int64 i, Int64 max_size)
 Signals that a value is not within the desired range.
__host__ __device__ void Arcane::arccoreCheckRange (Int64 i, Int64 min_value_inclusive, Int64 max_value_exclusive)
 Checks that min_value_inclusive <= i < max_value_exclusive.
__host__ __device__ void Arcane::arccoreCheckAt (Int64 i, Int64 max_size)
 Checks for potential array overflow.
void Arcane::_doAssert (const char *text, const char *file, const char *func, int line)
template<typename T>
T * Arcane::_checkPointer (const T *t, const char *file, const char *func, int line)
void Arcane::arccoreThrowNullPointerError (const char *ptr_name, const char *text)
 Signals the use of a null pointer by throwing an exception.
void * Arcane::arccoreThrowIfNull (void *ptr, const char *ptr_name, const char *text)
 Checks that a pointer is not null.
const void * Arcane::arccoreThrowIfNull (const void *ptr, const char *ptr_name, const char *text)
 Checks that a pointer is not null.
__host__ __device__ void Arccore::arccoreCheckAt (Int64 i, Int64 max_size)
 Checks for potential array overflow.
__host__ __device__ void Arccore::arccoreCheckRange (Int64 i, Int64 min_value_inclusive, Int64 max_value_exclusive)
 Checks that min_value_inclusive <= i < max_value_exclusive.
void Arccore::arccoreDebugPause (const char *msg)
 Enters pause mode or throws a fatal error.
bool Arccore::arccoreIsCheck ()
 True if in check mode.
bool Arccore::arccoreIsDebug ()
 True if the ARCCORE_DEBUG macro is defined.
void Arccore::arccoreNullPointerError ()
 Signals the use of a null pointer.
void Arccore::arccorePrintf (const char *,...)
 Encapsulation of the C printf function.
void Arccore::arccoreRangeError (Int64 i, Int64 min_value_inclusive, Int64 max_value_exclusive)
 Signals that a value is not within the desired range.
void Arccore::arccoreSetCheck (bool v)
 Activates or deactivates check mode.
void Arccore::arccoreSetPauseOnError (bool v)
 Indicates whether calling arccoreDebugPause() results in a pause.
void * Arccore::arccoreThrowIfNull (void *ptr, const char *ptr_name, const char *text)
 Checks that a pointer is not null.
void Arccore::arccoreThrowNullPointerError (const char *ptr_name, const char *text)
 Signals the use of a null pointer by throwing an exception.
template<typename T>
T * Arccore::_checkPointer (const T *t, const char *file, const char *func, int line)
void Arccore::_doAssert (const char *text, const char *file, const char *func, size_t line)

Detailed Description

Definitions and globals of Arccore.

Definition in file ArccoreGlobal.h.

Macro Definition Documentation

◆ ARCCORE_ALIGNAS

#define ARCCORE_ALIGNAS ( value)
Value:
__attribute__((aligned(value)))

Macro to guarantee the alignment of a class to value bytes.

Definition at line 443 of file ArccoreGlobal.h.

◆ ARCCORE_ALIGNAS_PACKED

#define ARCCORE_ALIGNAS_PACKED ( value)
Value:
__attribute__((aligned(value), packed))

Macro to guarantee the packing and alignment of a class to value bytes.

Definition at line 441 of file ArccoreGlobal.h.

◆ ARCCORE_ASSERT

#define ARCCORE_ASSERT ( a,
b )

Definition at line 735 of file ArccoreGlobal.h.

◆ ARCCORE_BASE_EXPORT

#define ARCCORE_BASE_EXPORT   ARCCORE_IMPORT

Definition at line 208 of file ArccoreGlobal.h.

◆ ARCCORE_BASE_EXTERN_TPL

#define ARCCORE_BASE_EXTERN_TPL   extern

Definition at line 209 of file ArccoreGlobal.h.

◆ ARCCORE_CAST_SMALL_SIZE

#define ARCCORE_CAST_SMALL_SIZE ( a)
Value:
((Integer)(a))

Definition at line 673 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_AT

#define ARCCORE_CHECK_AT ( a,
b )

Definition at line 653 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_AT2

#define ARCCORE_CHECK_AT2 ( a0,
a1,
b0,
b1 )
Value:
ARCCORE_CHECK_AT(a0, b0); \
ARCCORE_CHECK_AT(a1, b1)

Definition at line 657 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_AT3

#define ARCCORE_CHECK_AT3 ( a0,
a1,
a2,
b0,
b1,
b2 )
Value:
ARCCORE_CHECK_AT(a0, b0); \
ARCCORE_CHECK_AT(a1, b1); \
ARCCORE_CHECK_AT(a2, b2)

Definition at line 660 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_AT4

#define ARCCORE_CHECK_AT4 ( a0,
a1,
a2,
a3,
b0,
b1,
b2,
b3 )
Value:
ARCCORE_CHECK_AT(a0, b0); \
ARCCORE_CHECK_AT(a1, b1); \
ARCCORE_CHECK_AT(a2, b2); \
ARCCORE_CHECK_AT(a3, b3)

Definition at line 664 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_POINTER

◆ ARCCORE_CHECK_POINTER2

#define ARCCORE_CHECK_POINTER2 ( ptr,
text )
Value:
arccoreThrowIfNull(ptr, #ptr, text)

Macro that returns the pointer ptr if it is not null or throws an exception if it is null.

See also
arccoreThrowIfNull().

Definition at line 806 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_PTR

#define ARCCORE_CHECK_PTR ( a)

Definition at line 734 of file ArccoreGlobal.h.

◆ ARCCORE_CHECK_RANGE

#define ARCCORE_CHECK_RANGE ( a,
b,
c )

Definition at line 654 of file ArccoreGlobal.h.

◆ ARCCORE_CONSTEXPR

#define ARCCORE_CONSTEXPR   constexpr

Macro allowing specification of the C++11 'constexpr' keyword.

Definition at line 399 of file ArccoreGlobal.h.

Referenced by Arcane::BasicSerializer::paddingSize().

◆ ARCCORE_DCHECK_POINTER

#define ARCCORE_DCHECK_POINTER ( a)
Value:
(a);

Definition at line 737 of file ArccoreGlobal.h.

◆ ARCCORE_DEPRECATED

#define ARCCORE_DEPRECATED

Definition at line 380 of file ArccoreGlobal.h.

◆ ARCCORE_DEPRECATED_2017

#define ARCCORE_DEPRECATED_2017   ARCCORE_DEPRECATED

Definition at line 369 of file ArccoreGlobal.h.

◆ ARCCORE_DEPRECATED_2018

#define ARCCORE_DEPRECATED_2018   ARCCORE_DEPRECATED

Definition at line 370 of file ArccoreGlobal.h.

◆ ARCCORE_DEPRECATED_2019

#define ARCCORE_DEPRECATED_2019 ( reason)
Value:
[[deprecated(reason)]]

Definition at line 371 of file ArccoreGlobal.h.

◆ ARCCORE_DEPRECATED_2020

#define ARCCORE_DEPRECATED_2020 ( reason)
Value:
[[deprecated(reason)]]

Definition at line 372 of file ArccoreGlobal.h.

◆ ARCCORE_DEPRECATED_REASON

#define ARCCORE_DEPRECATED_REASON ( reason)
Value:
[[deprecated(reason)]]

Definition at line 373 of file ArccoreGlobal.h.

◆ ARCCORE_DEVICE

#define ARCCORE_DEVICE

Definition at line 153 of file ArccoreGlobal.h.

◆ ARCCORE_EXPORT

#define ARCCORE_EXPORT   __attribute__((visibility("default")))

Definition at line 60 of file ArccoreGlobal.h.

◆ ARCCORE_FATAL

#define ARCCORE_FATAL ( ...)
Value:
#define ARCCORE_THROW(exception_class,...)
Macro to throw an exception with formatting.

Macro throwing a FatalErrorException.

The macro arguments are used to format an error message via the String::format() method.

Definition at line 549 of file ArccoreGlobal.h.

Referenced by Arcane::Accelerator::Impl::_applyConstituentCells(), Arcane::Accelerator::Impl::_applyGenericLoop(), Arcane::Accelerator::impl::_applyItems(), Arcane::Accelerator::Impl::DeviceStorageBase::_copyToAsync(), Arcane::Accelerator::HostDeviceReducerBase< DataType, ReduceFunctor >::_reduce(), Arcane::Accelerator::GenericFilterer::apply(), Arcane::Accelerator::GenericSorter::apply(), Arcane::Accelerator::Impl::GenericFilteringIf::apply(), Arcane::Accelerator::Impl::GenericPartitionerIf::apply(), Arcane::Accelerator::Impl::GenericPartitionerIf::apply3(), Arcane::AbstractObserver::attachToObservable(), Arcane::basicDataTypeFromName(), Arcane::Accelerator::Impl::RunCommandLaunchInfo::beginExecute(), Arcane::BasicSerializer::copy(), Arcane::MemoryUtils::copyHost(), Arcane::Accelerator::Runner::deviceInfo(), Arcane::Accelerator::Impl::RunCommandLaunchInfo::endExecute(), Arcane::JSONValue::expectedChild(), Arcane::ITraceMng::fatalMessage(), Arcane::MemoryUtils::getMemoryResourceFromName(), Arcane::Accelerator::AcceleratorMng::initialize(), Arcane::MessagePassing::mpAllGather(), Arcane::JSONDocument::parse(), Arcane::Accelerator::WorkGroupLoopRangeBase< IsCooperativeLaunch, IndexType_ >::setBlockSize(), Arcane::Accelerator::RunQueue::setConcurrentCommandCreation(), Arcane::MessagePassing::PointToPointSerializerMng::setDefaultTag(), Arcane::MessagePassing::internal::BasicSerializeMessage::setStrategy(), Arcane::MessagePassing::PointToPointSerializerMng::setStrategy(), Arcane::String::toStdStringView(), and Arcane::Convert::ScalarType< T >::tryParseFromEnvironment().

◆ ARCCORE_FATAL_IF

#define ARCCORE_FATAL_IF ( cond,
... )
Value:
#define ARCCORE_THROW_IF(cond, exception_class,...)
Macro to throw an exception with formatting if cond is true.

Macro throwing a FatalErrorException if cond is true.

The macro arguments are used to format an error message via the String::format() method.

See also
ARCCORE_FATAL

Definition at line 560 of file ArccoreGlobal.h.

◆ ARCCORE_IMPORT

#define ARCCORE_IMPORT   __attribute__((visibility("default")))

Definition at line 61 of file ArccoreGlobal.h.

◆ ARCCORE_INTEGER_MAX

#define ARCCORE_INTEGER_MAX   ARCCORE_INT32_MAX

Macro indicating the maximum value that the #Integer type can take.

Definition at line 291 of file ArccoreGlobal.h.

◆ ARCCORE_JOIN_HELPER

#define ARCCORE_JOIN_HELPER ( a,
b )
Value:
ARCCORE_JOIN_HELPER2(a, b)

Definition at line 818 of file ArccoreGlobal.h.

◆ ARCCORE_JOIN_HELPER2

#define ARCCORE_JOIN_HELPER2 ( a,
b )
Value:
a##b

Definition at line 817 of file ArccoreGlobal.h.

◆ ARCCORE_JOIN_WITH_LINE

#define ARCCORE_JOIN_WITH_LINE ( a)
Value:
ARCCORE_JOIN_HELPER(a, __LINE__)

Definition at line 819 of file ArccoreGlobal.h.

◆ ARCCORE_MACRO_FUNCTION_NAME

#define ARCCORE_MACRO_FUNCTION_NAME   __func__

Definition at line 700 of file ArccoreGlobal.h.

◆ ARCCORE_NO_DEPRECATED

#define ARCCORE_NO_DEPRECATED

Definition at line 377 of file ArccoreGlobal.h.

◆ ARCCORE_NO_UNIQUE_ADDRESS

#define ARCCORE_NO_UNIQUE_ADDRESS   [[no_unique_address]]

Definition at line 421 of file ArccoreGlobal.h.

◆ ARCCORE_NOEXCEPT

#define ARCCORE_NOEXCEPT   noexcept

Definition at line 402 of file ArccoreGlobal.h.

◆ ARCCORE_NOEXCEPT_FALSE

#define ARCCORE_NOEXCEPT_FALSE   noexcept(false)

Definition at line 405 of file ArccoreGlobal.h.

◆ ARCCORE_NORETURN

#define ARCCORE_NORETURN   [[noreturn]]

Definition at line 396 of file ArccoreGlobal.h.

◆ ARCCORE_REAL

#define ARCCORE_REAL ( val)
Value:
val

Definition at line 267 of file ArccoreGlobal.h.

◆ ARCCORE_REAL_IS_DOUBLE

#define ARCCORE_REAL_IS_DOUBLE

Definition at line 268 of file ArccoreGlobal.h.

◆ ARCCORE_RESTRICT

#define ARCCORE_RESTRICT

Definition at line 94 of file ArccoreGlobal.h.

◆ ARCCORE_STD

#define ARCCORE_STD   std

Definition at line 97 of file ArccoreGlobal.h.

◆ ARCCORE_TEMPLATE_EXPORT

#define ARCCORE_TEMPLATE_EXPORT   ARCCORE_EXPORT

Definition at line 62 of file ArccoreGlobal.h.

◆ ARCCORE_THROW

#define ARCCORE_THROW ( exception_class,
... )
Value:
throw exception_class(A_FUNCINFO, Arccore::String::format(__VA_ARGS__))

Macro to throw an exception with formatting.

exception_class is the type of the exception. The following arguments of the macro are used to format an error message via the String::format() method.

Definition at line 524 of file ArccoreGlobal.h.

Referenced by Arcane::Accelerator::Impl::GenericPartitionerIf::apply(), Arcane::Accelerator::Impl::GenericPartitionerIf::apply3(), Arcane::StringUtils::convertToArcaneString(), and Arcane::StringUtils::convertToStdWString().

◆ ARCCORE_THROW_IF

#define ARCCORE_THROW_IF ( cond,
exception_class,
... )
Value:
if (cond) [[unlikely]] \
ARCCORE_THROW(exception_class, __VA_ARGS__)

Macro to throw an exception with formatting if cond is true.

exception_class is the type of the exception. The following arguments of the macro are used to format an error message via the String::format() method.

See also
ARCCORE_THROW

Definition at line 536 of file ArccoreGlobal.h.

◆ ARCCORE_UNUSED

#define ARCCORE_UNUSED ( var)
Value:
do { \
(void)(var); \
} while (false)

Definition at line 101 of file ArccoreGlobal.h.

◆ ARCCORE_WARNING

#define ARCCORE_WARNING ( a)

Definition at line 736 of file ArccoreGlobal.h.

Typedef Documentation

◆ Int16

typedef ARCCORE_TYPE_INT16 Int16

Definition at line 110 of file ArccoreGlobal.h.

◆ Int32

typedef ARCCORE_TYPE_INT32 Int32

Definition at line 111 of file ArccoreGlobal.h.

◆ Int64

typedef ARCCORE_TYPE_INT64 Int64

Definition at line 112 of file ArccoreGlobal.h.