NkPlatformInline.h
#include "NKPlatform/NkPlatformInline.h"nkentseudependson(["NKPlatform"])Macros · 23
NKENTSEU_INLINE_COMPILER_MSVC | Defined, with no value, when the compiler is MSVC (_MSC_VER). |
NKENTSEU_INLINE_COMPILER_NAME | Name of the compiler seen by NkPlatformInline.h, as a string ("MSVC", "Clang", "GCC"...). |
NKENTSEU_INLINE_COMPILER_CLANG | Defined, with no value, when the compiler is Clang (and not MSVC). |
NKENTSEU_INLINE_COMPILER_GCC | Defined, with no value, when the compiler is GCC (neither MSVC nor Clang). |
NKENTSEU_INLINE_COMPILER_INTEL | Defined, with no value, when the compiler is Intel's. |
NKENTSEU_INLINE_COMPILER_ARMCC | Defined, with no value, when the compiler is ARM Compiler (armcc). |
NKENTSEU_INLINE_COMPILER_IAR | Defined, with no value, when the compiler is IAR. |
NKENTSEU_INLINE_COMPILER_UNKNOWN | Defined, with no value, when no known compiler is recognised. |
NKENTSEU_INLINE | The language's inline keyword (inline in C++ and C99, __inline or __inline__ elsewhere). |
NKENTSEU_FORCE_INLINE | Asks the compiler to inline the function at every call (__forceinline, always_inline). |
NKENTSEU_NO_INLINE | Forbids the compiler from inlining the function (__declspec(noinline), noinline). |
NKENTSEU_PURE_FUNCTION | States that a function has no side effects |
NKENTSEU_CONST_FUNCTION | States that a function only depends on its parameters |
NKENTSEU_RESTRICT_RETURN | States that the returned pointer aliases no other pointer |
NKENTSEU_RESTRICT_PARAM | States that the pointer parameters do not alias each other |
NKENTSEU_NORETURN | States that the function may not return |
NKENTSEU_COLD_FUNCTION | States that the function is unlikely to be called |
NKENTSEU_HOT_FUNCTION | States that the function is very likely to be called |
NKENTSEU_LIKELY | States that a condition is probably true |
NKENTSEU_UNLIKELY | States that a condition is probably false |
NKENTSEU_API_INLINE | Exports an inline function |
NKENTSEU_API_FORCE_INLINE | Exports a force_inline function |
NKENTSEU_API_NO_INLINE | Exports a no_inline function |
Member details
Defined, with no value, when the compiler is MSVC (_MSC_VER).
Name of the compiler seen by NkPlatformInline.h, as a string ("MSVC", "Clang", "GCC"...).
Defined, with no value, when the compiler is Clang (and not MSVC).
Defined, with no value, when the compiler is GCC (neither MSVC nor Clang).
Defined, with no value, when the compiler is Intel's.
Defined, with no value, when the compiler is ARM Compiler (armcc).
Defined, with no value, when the compiler is IAR.
Defined, with no value, when no known compiler is recognised.
The language's inline keyword (inline in C++ and C99, __inline or __inline__ elsewhere).
Asks the compiler to inline the function at every call (__forceinline, always_inline).
Forbids the compiler from inlining the function (__declspec(noinline), noinline).
States that a function has no side effects
NKENTSEU_PURE_FUNCTION int Square(int x) { return x * x; }
States that a function only depends on its parameters
NKENTSEU_CONST_FUNCTION int Add(int a, int b) { return a + b; }
States that the returned pointer aliases no other pointer
States that the pointer parameters do not alias each other
void VectorAdd( float* NKENTSEU_RESTRICT_PARAM(out), const float* NKENTSEU_RESTRICT_PARAM(a), const float* NKENTSEU_RESTRICT_PARAM(b), size_t count );
States that the function may not return
NKENTSEU_NORETURN void FatalError(const char* message);
States that the function is unlikely to be called
States that the function is very likely to be called
States that a condition is probably true
if (NKENTSEU_LIKELY(ptr != nullptr)) { // Hot path : code fréquemment exécuté ProcessData(ptr); } else { // Cold path : gestion d'erreur rare HandleNullPointer(); }
States that a condition is probably false
if (NKENTSEU_UNLIKELY(errorCode != 0)) { LogError(errorCode); return false; } // Hot path continue ici sans saut
Exports an inline function
Exports a force_inline function
Exports a no_inline function