NkArchDetect.h
Détection d'architecture CPU et définition des macros associées.
Inclure
#include "NKPlatform/NkArchDetect.h"
Lier (Jenga)
nkentseudependson(["NKPlatform"])
Macros · 151
Détail des membres
NKENTSEU_ARCH_X86_64
#macro
#define NKENTSEU_ARCH_X86_64
Macro de détection d'architecture x86_64
Définie lorsque le code est compilé pour une architecture x86_64 (AMD64 ou Intel 64). Détectée via les macros __x86_64__, _M_X64, etc.
NKENTSEU_ARCH_64BIT
#macro
#define NKENTSEU_ARCH_64BIT
Macro de détection d'architecture 64-bit
Définie pour toute architecture 64-bit détectée. Permet d'écrire du code conditionnel basé sur la largeur des pointeurs.
#define NKENTSEU_ARCH_NAME
Macro de nom d'architecture lisible
Utile pour les logs, le debug et l'affichage d'informations système. Exemple : "x86_64", "ARM64", "RISC-V 64", etc.
Retour
Chaîne constante représentant l'architecture détectée
NKENTSEU_ARCH_VERSION
#macro
#define NKENTSEU_ARCH_VERSION
Macro de version d'architecture détaillée
Fournit des informations supplémentaires comme le jeu d'instructions ou la génération de l'architecture. Exemple : "AMD64/Intel 64-bit".
Retour
Chaîne constante avec des détails sur la version de l'architecture
NKENTSEU_ARCH_ARM64
#macro
#define NKENTSEU_ARCH_ARM64
Macro de détection d'architecture ARM64
Définie lorsque le code est compilé pour ARM 64-bit (AArch64/ARMv8). Détectée via __aarch64__, _M_ARM64, __ARM64__, etc.
NKENTSEU_ARCH_PPC64
#macro
#define NKENTSEU_ARCH_PPC64
NKENTSEU_ARCH_MIPS64
#macro
#define NKENTSEU_ARCH_MIPS64
NKENTSEU_ARCH_RISCV64
#macro
#define NKENTSEU_ARCH_RISCV64
NKENTSEU_ARCH_SPARC64
#macro
#define NKENTSEU_ARCH_SPARC64
#define NKENTSEU_ARCH_X86
NKENTSEU_ARCH_32BIT
#macro
#define NKENTSEU_ARCH_32BIT
#define NKENTSEU_ARCH_ARM
NKENTSEU_ARCH_ARM32
#macro
#define NKENTSEU_ARCH_ARM32
#define NKENTSEU_ARCH_PPC
#define NKENTSEU_ARCH_MIPS
NKENTSEU_ARCH_SPARC
#macro
#define NKENTSEU_ARCH_SPARC
NKENTSEU_ARCH_ELBRUS
#macro
#define NKENTSEU_ARCH_ELBRUS
NKENTSEU_ARCH_ELBRUS_VLIW
#macro
#define NKENTSEU_ARCH_ELBRUS_VLIW
NKENTSEU_ARCH_SUPERH
#macro
#define NKENTSEU_ARCH_SUPERH
NKENTSEU_ARCH_ALPHA
#macro
#define NKENTSEU_ARCH_ALPHA
NKENTSEU_ARCH_PARISC
#macro
#define NKENTSEU_ARCH_PARISC
#define NKENTSEU_ARCH_IA64
#define NKENTSEU_ARCH_M68K
#define NKENTSEU_ARCH_S390
#define NKENTSEU_ARCH_TILE
NKENTSEU_ARCH_XTENSA
#macro
#define NKENTSEU_ARCH_XTENSA
NKENTSEU_ARCH_R5900
#macro
#define NKENTSEU_ARCH_R5900
NKENTSEU_ARCH_CELL_PPU
#macro
#define NKENTSEU_ARCH_CELL_PPU
NKENTSEU_ARCH_UNKNOWN_64
#macro
#define NKENTSEU_ARCH_UNKNOWN_64
NKENTSEU_ARCH_UNKNOWN_32
#macro
#define NKENTSEU_ARCH_UNKNOWN_32
NKENTSEU_ARCH_UNKNOWN
#macro
#define NKENTSEU_ARCH_UNKNOWN
NKENTSEU_ARCH_INTEL
#macro
#define NKENTSEU_ARCH_INTEL
Macro de détection d'architecture Intel (x86/x86_64)
Définie si l'architecture est de la famille Intel/AMD x86. Utile pour activer des optimisations spécifiques à cette famille.
NKENTSEU_ARCH_ARM_FAMILY
#macro
#define NKENTSEU_ARCH_ARM_FAMILY
Macro de détection d'architecture ARM (ARM/ARM64)
Définie si l'architecture est de la famille ARM (32 ou 64-bit). Permet de factoriser le code commun aux variantes ARM.
NKENTSEU_ARCH_LITTLE_ENDIAN
#macro
#define NKENTSEU_ARCH_LITTLE_ENDIAN
Macro de détection d'endianness little-endian
Définie si l'architecture utilise l'ordre little-endian (octet de poids faible en premier). Majoritaire sur x86, ARM moderne.
NKENTSEU_ARCH_BIG_ENDIAN
#macro
#define NKENTSEU_ARCH_BIG_ENDIAN
Macro de détection d'endianness big-endian
Définie si l'architecture utilise l'ordre big-endian (octet de poids fort en premier). Présent sur certains PowerPC, SPARC, réseau.
NKENTSEU_CPU_HAS_SSE
#macro
#define NKENTSEU_CPU_HAS_SSE
Macro de détection de support SSE
Définie si le compilateur cible supporte les instructions SSE. Permet d'utiliser <xmmintrin.h> et les types __m128.
NKENTSEU_CPU_HAS_SSE2
#macro
#define NKENTSEU_CPU_HAS_SSE2
Macro de détection de support SSE2
Définie si le compilateur cible supporte SSE2. Requis pour les opérations SIMD sur doubles et entiers 64-bit.
NKENTSEU_CPU_HAS_SSE3
#macro
#define NKENTSEU_CPU_HAS_SSE3
Macro de détection de support SSE3
NKENTSEU_CPU_HAS_SSSE3
#macro
#define NKENTSEU_CPU_HAS_SSSE3
Macro de détection de support SSSE3
NKENTSEU_CPU_HAS_SSE4_1
#macro
#define NKENTSEU_CPU_HAS_SSE4_1
Macro de détection de support SSE4.1
NKENTSEU_CPU_HAS_SSE4_2
#macro
#define NKENTSEU_CPU_HAS_SSE4_2
Macro de détection de support SSE4.2
NKENTSEU_CPU_HAS_AVX
#macro
#define NKENTSEU_CPU_HAS_AVX
Macro de détection de support AVX
Définie si le compilateur cible supporte AVX (registres YMM 256-bit). Nécessite un alignement mémoire sur 32 octets pour les opérations SIMD.
NKENTSEU_CPU_HAS_AVX2
#macro
#define NKENTSEU_CPU_HAS_AVX2
Macro de détection de support AVX2
Définie si le compilateur cible supporte AVX2 (opérations entières SIMD).
NKENTSEU_CPU_HAS_AVX512
#macro
#define NKENTSEU_CPU_HAS_AVX512
Macro de détection de support AVX-512
Définie si le compilateur cible supporte AVX-512 (registres ZMM 512-bit). Disponible sur les CPU Intel récents et certains AMD.
NKENTSEU_CPU_HAS_AES
#macro
#define NKENTSEU_CPU_HAS_AES
Macro de détection de support AES-NI
Définie si le CPU supporte les instructions AES matérielles. Accélère significativement le chiffrement/déchiffrement AES.
NKENTSEU_CPU_HAS_BMI
#macro
#define NKENTSEU_CPU_HAS_BMI
Macro de détection de support BMI/BMI2
Définie si le CPU supporte Bit Manipulation Instructions. Utile pour les opérations bit-à-bit optimisées.
NKENTSEU_CPU_HAS_FMA
#macro
#define NKENTSEU_CPU_HAS_FMA
Macro de détection de support FMA
Définie si le CPU supporte Fused Multiply-Add. Améliore la précision et la performance des calculs flottants.
NKENTSEU_CPU_HAS_NEON
#macro
#define NKENTSEU_CPU_HAS_NEON
Macro de détection de support NEON (ARM)
Définie si le compilateur cible supporte NEON (SIMD ARM). Équivalent ARM des extensions SSE/AVX sur x86.
NKENTSEU_CPU_HAS_ARM_CRYPTO
#macro
#define NKENTSEU_CPU_HAS_ARM_CRYPTO
Macro de détection de support crypto ARM
Définie si le CPU ARM supporte les extensions cryptographiques matérielles. Inclut AES, SHA-1, SHA-2 accélérés.
NKENTSEU_CPU_HAS_ARM_CRC32
#macro
#define NKENTSEU_CPU_HAS_ARM_CRC32
Macro de détection de support CRC32 ARM
Définie si le CPU ARM supporte l'instruction CRC32 matérielle.
NKENTSEU_CPU_HAS_ALTIVEC
#macro
#define NKENTSEU_CPU_HAS_ALTIVEC
Macro de détection de support Altivec/VMX (PowerPC)
Définie si le compilateur cible supporte Altivec (SIMD PowerPC).
NKENTSEU_CPU_HAS_VSX
#macro
#define NKENTSEU_CPU_HAS_VSX
Macro de détection de support VSX (PowerPC)
Définie si le compilateur cible supporte VSX (Vector Scalar Extensions). Extension moderne d'Altivec avec plus de registres.
NKENTSEU_CPU_HAS_MSA
#macro
#define NKENTSEU_CPU_HAS_MSA
Macro de détection de support MSA (MIPS)
Définie si le compilateur cible supporte MSA (MIPS SIMD Architecture).
NKENTSEU_CACHE_LINE_SIZE
#macro
#define NKENTSEU_CACHE_LINE_SIZE
Taille de ligne de cache en octets
Utilisé pour l'alignement des structures fréquemment accédées afin d'éviter le false sharing dans le code multithreadé.
NKENTSEU_MAX_ALIGNMENT
#macro
#define NKENTSEU_MAX_ALIGNMENT
Alignement maximal supporté par l'architecture
Valeur maximale recommandée pour les alignements mémoire. Utile pour l'allocation dynamique alignée (aligned_alloc, _mm_malloc).
#define NKENTSEU_PAGE_SIZE
Taille de page mémoire standard en octets
Utilisé pour les opérations de mémoire virtuelle (mmap, VirtualAlloc). Les allocations inférieures à cette taille peuvent être sous-optimales.
NKENTSEU_HUGE_PAGE_SIZE
#macro
#define NKENTSEU_HUGE_PAGE_SIZE
Taille de page énorme (huge page) en octets
Utilisé pour les allocations de grande taille où la réduction des TLB misses justifie l'utilisation de huge pages (performance critique).
#define NKENTSEU_WORD_SIZE
Taille de mot machine en octets
#define NKENTSEU_WORD_BITS
Nombre de bits dans un mot machine
#define NKENTSEU_PTR_BITS
Nombre de bits dans un pointeur
NKENTSEU_ALIGN_CACHE
#macro
#define NKENTSEU_ALIGN_CACHE
Attribut d'alignement sur ligne de cache
Aligne la variable/structure sur NKENTSEU_CACHE_LINE_SIZE octets. Recommandé pour les données partagées entre threads pour éviter le false sharing.
#define NKENTSEU_ALIGN_16
Attribut d'alignement sur 16 octets
Requis pour les opérations SSE/NEON de base.
#define NKENTSEU_ALIGN_32
Attribut d'alignement sur 32 octets
Requis pour les opérations AVX/AVX2.
#define NKENTSEU_ALIGN_64
Attribut d'alignement sur 64 octets
Requis pour les opérations AVX-512 et optimisation cache.
#define NKENTSEU_ALIGN(n)
Attribut d'alignement personnalisé
NKENTSEU_X86_64_ONLY
#macro
#define NKENTSEU_X86_64_ONLY(...)
NKENTSEU_NOT_X86_64
#macro
#define NKENTSEU_NOT_X86_64(...)
NKENTSEU_ARM64_ONLY
#macro
#define NKENTSEU_ARM64_ONLY(...)
#define NKENTSEU_NOT_ARM64(...)
NKENTSEU_PPC64_ONLY
#macro
#define NKENTSEU_PPC64_ONLY(...)
#define NKENTSEU_NOT_PPC64(...)
NKENTSEU_MIPS64_ONLY
#macro
#define NKENTSEU_MIPS64_ONLY(...)
NKENTSEU_NOT_MIPS64
#macro
#define NKENTSEU_NOT_MIPS64(...)
NKENTSEU_RISCV64_ONLY
#macro
#define NKENTSEU_RISCV64_ONLY(...)
NKENTSEU_NOT_RISCV64
#macro
#define NKENTSEU_NOT_RISCV64(...)
NKENTSEU_SPARC64_ONLY
#macro
#define NKENTSEU_SPARC64_ONLY(...)
NKENTSEU_NOT_SPARC64
#macro
#define NKENTSEU_NOT_SPARC64(...)
#define NKENTSEU_IA64_ONLY(...)
#define NKENTSEU_NOT_IA64(...)
#define NKENTSEU_X86_ONLY(...)
#define NKENTSEU_NOT_X86(...)
#define NKENTSEU_ARM_ONLY(...)
#define NKENTSEU_NOT_ARM(...)
#define NKENTSEU_PPC_ONLY(...)
#define NKENTSEU_NOT_PPC(...)
#define NKENTSEU_MIPS_ONLY(...)
#define NKENTSEU_NOT_MIPS(...)
NKENTSEU_SPARC_ONLY
#macro
#define NKENTSEU_SPARC_ONLY(...)
#define NKENTSEU_NOT_SPARC(...)
NKENTSEU_R5900_ONLY
#macro
#define NKENTSEU_R5900_ONLY(...)
#define NKENTSEU_NOT_R5900(...)
NKENTSEU_CELL_PPU_ONLY
#macro
#define NKENTSEU_CELL_PPU_ONLY(...)
NKENTSEU_NOT_CELL_PPU
#macro
#define NKENTSEU_NOT_CELL_PPU(...)
NKENTSEU_ELBRUS_ONLY
#macro
#define NKENTSEU_ELBRUS_ONLY(...)
NKENTSEU_NOT_ELBRUS
#macro
#define NKENTSEU_NOT_ELBRUS(...)
NKENTSEU_SUPERH_ONLY
#macro
#define NKENTSEU_SUPERH_ONLY(...)
NKENTSEU_NOT_SUPERH
#macro
#define NKENTSEU_NOT_SUPERH(...)
NKENTSEU_ALPHA_ONLY
#macro
#define NKENTSEU_ALPHA_ONLY(...)
#define NKENTSEU_NOT_ALPHA(...)
#define NKENTSEU_M68K_ONLY(...)
#define NKENTSEU_NOT_M68K(...)
NKENTSEU_XTENSA_ONLY
#macro
#define NKENTSEU_XTENSA_ONLY(...)
NKENTSEU_NOT_XTENSA
#macro
#define NKENTSEU_NOT_XTENSA(...)
NKENTSEU_INTEL_ONLY
#macro
#define NKENTSEU_INTEL_ONLY(...)
#define NKENTSEU_NOT_INTEL(...)
NKENTSEU_ARM_FAMILY_ONLY
#macro
#define NKENTSEU_ARM_FAMILY_ONLY(...)
NKENTSEU_NOT_ARM_FAMILY
#macro
#define NKENTSEU_NOT_ARM_FAMILY(...)
NKENTSEU_64BIT_ONLY
#macro
#define NKENTSEU_64BIT_ONLY(...)
#define NKENTSEU_NOT_64BIT(...)
NKENTSEU_32BIT_ONLY
#macro
#define NKENTSEU_32BIT_ONLY(...)
#define NKENTSEU_NOT_32BIT(...)
NKENTSEU_LITTLE_ENDIAN_ONLY
#macro
#define NKENTSEU_LITTLE_ENDIAN_ONLY(...)
NKENTSEU_NOT_LITTLE_ENDIAN
#macro
#define NKENTSEU_NOT_LITTLE_ENDIAN(...)
NKENTSEU_BIG_ENDIAN_ONLY
#macro
#define NKENTSEU_BIG_ENDIAN_ONLY(...)
NKENTSEU_NOT_BIG_ENDIAN
#macro
#define NKENTSEU_NOT_BIG_ENDIAN(...)
#define NKENTSEU_SSE_ONLY(...)
#define NKENTSEU_NOT_SSE(...)
#define NKENTSEU_SSE2_ONLY(...)
#define NKENTSEU_NOT_SSE2(...)
#define NKENTSEU_SSE3_ONLY(...)
#define NKENTSEU_NOT_SSE3(...)
NKENTSEU_SSSE3_ONLY
#macro
#define NKENTSEU_SSSE3_ONLY(...)
#define NKENTSEU_NOT_SSSE3(...)
NKENTSEU_SSE4_1_ONLY
#macro
#define NKENTSEU_SSE4_1_ONLY(...)
NKENTSEU_NOT_SSE4_1
#macro
#define NKENTSEU_NOT_SSE4_1(...)
NKENTSEU_SSE4_2_ONLY
#macro
#define NKENTSEU_SSE4_2_ONLY(...)
NKENTSEU_NOT_SSE4_2
#macro
#define NKENTSEU_NOT_SSE4_2(...)
#define NKENTSEU_AVX_ONLY(...)
#define NKENTSEU_NOT_AVX(...)
#define NKENTSEU_AVX2_ONLY(...)
#define NKENTSEU_NOT_AVX2(...)
NKENTSEU_AVX512_ONLY
#macro
#define NKENTSEU_AVX512_ONLY(...)
NKENTSEU_NOT_AVX512
#macro
#define NKENTSEU_NOT_AVX512(...)
#define NKENTSEU_AES_ONLY(...)
#define NKENTSEU_NOT_AES(...)
#define NKENTSEU_BMI_ONLY(...)
#define NKENTSEU_NOT_BMI(...)
#define NKENTSEU_FMA_ONLY(...)
#define NKENTSEU_NOT_FMA(...)
#define NKENTSEU_NEON_ONLY(...)
#define NKENTSEU_NOT_NEON(...)
NKENTSEU_ARM_CRYPTO_ONLY
#macro
#define NKENTSEU_ARM_CRYPTO_ONLY(...)
NKENTSEU_NOT_ARM_CRYPTO
#macro
#define NKENTSEU_NOT_ARM_CRYPTO(...)
NKENTSEU_ARM_CRC32_ONLY
#macro
#define NKENTSEU_ARM_CRC32_ONLY(...)
NKENTSEU_NOT_ARM_CRC32
#macro
#define NKENTSEU_NOT_ARM_CRC32(...)
NKENTSEU_ALTIVEC_ONLY
#macro
#define NKENTSEU_ALTIVEC_ONLY(...)
NKENTSEU_NOT_ALTIVEC
#macro
#define NKENTSEU_NOT_ALTIVEC(...)
#define NKENTSEU_VSX_ONLY(...)
#define NKENTSEU_NOT_VSX(...)
#define NKENTSEU_MSA_ONLY(...)
#define NKENTSEU_NOT_MSA(...)