Home Knowledge Base SIMD Intrinsics

SIMD Intrinsics are low-level C/C++ functions that map directly to SIMD (Single Instruction Multiple Data) CPU instructions — bypassing the compiler to explicitly exploit vector registers for processing 4, 8, 16, or 32 data elements per instruction.

SIMD Evolution on x86

ExtensionRegister WidthFloat/Int ElementsYear
SSE2128-bit (XMM)4 float / 2 double2001
AVX256-bit (YMM)8 float / 4 double2011
AVX2256-bit + integer8 int32, 16 int162013
AVX-512512-bit (ZMM)16 float, 8 double2017
AMX2D tile registersMatrix multiply2021

Example: AVX2 Vectorized Addition

#include <immintrin.h>

void add_arrays(float* a, float* b, float* c, int n) {
    for (int i = 0; i < n; i += 8) {
        __m256 va = _mm256_loadu_ps(a + i);    // Load 8 floats
        __m256 vb = _mm256_loadu_ps(b + i);
        __m256 vc = _mm256_add_ps(va, vb);     // Add 8 pairs in parallel
        _mm256_storeu_ps(c + i, vc);           // Store 8 results
    }
}

Key Intrinsic Categories

FMA (Fused Multiply-Add)

When to Use Intrinsics vs. Auto-Vectorization

SIMD intrinsics are the highest-performance path for compute-intensive loops — critical path optimization in media codecs, ML inference engines, database scans, and scientific simulations routinely requires explicit vectorization to approach peak hardware throughput.

simd intrinsicsavx512intel intrinsicsavx2 programmingexplicit vectorization

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.