# Instruction Set Macros

Each of these macros corresponds to an instruction set supported by XSIMD. They can be used to filter arch-specific code.

XSIMD_WITH_SSE2

  Set to 1 if SSE2 is available at compile-time, to 0 otherwise.

XSIMD_WITH_SSE3

  Set to 1 if SSE3 is available at compile-time, to 0 otherwise.

XSIMD_WITH_SSSE3

  Set to 1 if SSSE3 is available at compile-time, to 0 otherwise.

XSIMD_WITH_SSE4_1

  Set to 1 if SSE4.1 is available at compile-time, to 0 otherwise.

XSIMD_WITH_SSE4_2

  Set to 1 if SSE4.2 is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX

  Set to 1 if AVX is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX2

  Set to 1 if AVX2 is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVXVNNI

  Set to 1 if AVXVNNI is available at compile-time, to 0 otherwise.

XSIMD_WITH_FMA3_SSE

  Set to 1 if FMA3 for SSE is available at compile-time, to 0 otherwise.

XSIMD_WITH_FMA3_AVX

  Set to 1 if FMA3 for AVX is available at compile-time, to 0 otherwise.

XSIMD_WITH_FMA4

  Set to 1 if FMA4 is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512F

  Set to 1 if AVX512F is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512CD

  Set to 1 if AVX512CD is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512DQ

  Set to 1 if AVX512DQ is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512BW

  Set to 1 if AVX512BW is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512ER

  Set to 1 if AVX512ER is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512PF

  Set to 1 if AVX512PF is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512IFMA

  Set to 1 if AVX512IFMA is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512VBMI

  Set to 1 if AVX512VBMI is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512VBMI2

  Set to 1 if AVX512VBMI2 is available at compile-time, to 0 otherwise.

XSIMD_WITH_AVX512VNNI_AVX512VBMI2

  Set to 1 if AVX512VNNI is available at compile-time, to 0 otherwise.

XSIMD_WITH_I8MM_NEON64

  Set to 1 if i8mm neon64 extension is available at compile-time, to 0 otherwise.

XSIMD_WITH_SVE

  Set to 1 if SVE is available and bit width is pre-set at compile-time, to 0 otherwise.

XSIMD_WITH_RVV

  Set to 1 if RVV is available and bit width is pre-set at compile-time, to 0 otherwise.

XSIMD_WITH_WASM

  Set to 1 if WebAssembly SIMD is available at compile-time, to 0 otherwise.

XSIMD_WITH_VSX

  Set to 1 if VMX with VSX extension is available at compile-time, to 0 otherwise.

## Changing Default Architecture

You can change the default instruction set used by xsimd (when none is provided explicitely) by setting the `XSIMD_DEFAULT_ARCH` macro to, say, `xsimd::avx2`. A common usage is to set it to `xsimd::unsupported` as a way to detect instantiation of batches with the default architecture.