Rihen Rihen NkentseuDocumentation

NkPlatformInline.h

Include
#include "NKPlatform/NkPlatformInline.h"
Link (Jenga)
nkentseudependson(["NKPlatform"])

Macros · 23

NKENTSEU_INLINE_COMPILER_MSVC
NKENTSEU_INLINE_COMPILER_NAME
NKENTSEU_INLINE_COMPILER_CLANG
NKENTSEU_INLINE_COMPILER_GCC
NKENTSEU_INLINE_COMPILER_INTEL
NKENTSEU_INLINE_COMPILER_ARMCC
NKENTSEU_INLINE_COMPILER_IAR
NKENTSEU_INLINE_COMPILER_UNKNOWN
NKENTSEU_INLINE
NKENTSEU_FORCE_INLINE
NKENTSEU_NO_INLINE
NKENTSEU_PURE_FUNCTIONStates that a function has no side effects
NKENTSEU_CONST_FUNCTIONStates that a function only depends on its parameters
NKENTSEU_RESTRICT_RETURNStates that the returned pointer aliases no other pointer
NKENTSEU_RESTRICT_PARAMStates that the pointer parameters do not alias each other
NKENTSEU_NORETURNStates that the function may not return
NKENTSEU_COLD_FUNCTIONStates that the function is unlikely to be called
NKENTSEU_HOT_FUNCTIONStates that the function is very likely to be called
NKENTSEU_LIKELYStates that a condition is probably true
NKENTSEU_UNLIKELYStates that a condition is probably false
NKENTSEU_API_INLINEExports an inline function
NKENTSEU_API_FORCE_INLINEExports a force_inline function
NKENTSEU_API_NO_INLINEExports a no_inline function

Member details

NKENTSEU_INLINE_COMPILER_MSVC

#
macro
#define NKENTSEU_INLINE_COMPILER_MSVC

NKENTSEU_INLINE_COMPILER_NAME

#
macro
#define NKENTSEU_INLINE_COMPILER_NAME

NKENTSEU_INLINE_COMPILER_CLANG

#
macro
#define NKENTSEU_INLINE_COMPILER_CLANG

NKENTSEU_INLINE_COMPILER_GCC

#
macro
#define NKENTSEU_INLINE_COMPILER_GCC

NKENTSEU_INLINE_COMPILER_INTEL

#
macro
#define NKENTSEU_INLINE_COMPILER_INTEL

NKENTSEU_INLINE_COMPILER_ARMCC

#
macro
#define NKENTSEU_INLINE_COMPILER_ARMCC

NKENTSEU_INLINE_COMPILER_IAR

#
macro
#define NKENTSEU_INLINE_COMPILER_IAR

NKENTSEU_INLINE_COMPILER_UNKNOWN

#
macro
#define NKENTSEU_INLINE_COMPILER_UNKNOWN

NKENTSEU_INLINE

#
macro
#define NKENTSEU_INLINE

NKENTSEU_FORCE_INLINE

#
macro
#define NKENTSEU_FORCE_INLINE

NKENTSEU_NO_INLINE

#
macro
#define NKENTSEU_NO_INLINE

NKENTSEU_PURE_FUNCTION

#
macro
#define NKENTSEU_PURE_FUNCTION

States that a function has no side effects

@codefragment, not compiled
NKENTSEU_PURE_FUNCTION int Square(int x) { return x * x; }

NKENTSEU_CONST_FUNCTION

#
macro
#define NKENTSEU_CONST_FUNCTION

States that a function only depends on its parameters

@codefragment, not compiled
NKENTSEU_CONST_FUNCTION int Add(int a, int b) { return a + b; }

NKENTSEU_RESTRICT_RETURN

#
macro
#define NKENTSEU_RESTRICT_RETURN

States that the returned pointer aliases no other pointer

NKENTSEU_RESTRICT_PARAM

#
macro
#define NKENTSEU_RESTRICT_PARAM(ptr)

States that the pointer parameters do not alias each other

@codefragment, not compiled
void VectorAdd(
    float* NKENTSEU_RESTRICT_PARAM(out),
    const float* NKENTSEU_RESTRICT_PARAM(a),
    const float* NKENTSEU_RESTRICT_PARAM(b),
    size_t count
);

NKENTSEU_NORETURN

#
macro
#define NKENTSEU_NORETURN

States that the function may not return

@codefragment, not compiled
NKENTSEU_NORETURN void FatalError(const char* message);

NKENTSEU_COLD_FUNCTION

#
macro
#define NKENTSEU_COLD_FUNCTION

States that the function is unlikely to be called

NKENTSEU_HOT_FUNCTION

#
macro
#define NKENTSEU_HOT_FUNCTION

States that the function is very likely to be called

NKENTSEU_LIKELY

#
macro
#define NKENTSEU_LIKELY(condition)

States that a condition is probably true

@codefragment, not compiled
if (NKENTSEU_LIKELY(ptr != nullptr)) {
    // Hot path : code fréquemment exécuté
    ProcessData(ptr);
} else {
    // Cold path : gestion d'erreur rare
    HandleNullPointer();
}

NKENTSEU_UNLIKELY

#
macro
#define NKENTSEU_UNLIKELY(condition)

States that a condition is probably false

@codefragment, not compiled
if (NKENTSEU_UNLIKELY(errorCode != 0)) {
    LogError(errorCode);
    return false;
}
// Hot path continue ici sans saut

NKENTSEU_API_INLINE

#
macro
#define NKENTSEU_API_INLINE

Exports an inline function

NKENTSEU_API_FORCE_INLINE

#
macro
#define NKENTSEU_API_FORCE_INLINE

Exports a force_inline function

NKENTSEU_API_NO_INLINE

#
macro
#define NKENTSEU_API_NO_INLINE

Exports a no_inline function