What is SIMD?
Short for single instruction, multiple data: one instruction performs the same operation on several data elements at once. It speeds up image processing and AI calculations.
Japanese name: SIMD
Short for single instruction, multiple data: one instruction performs the same operation on several data elements at once. It speeds up image processing and AI calculations.
Japanese name: SIMD
A SIMD (single instruction, multiple data) unit treats a wide register as a set of independent lanes. A 128-bit register holds four 32-bit values, and a 512-bit register holds sixteen; one add instruction adds all lanes in parallel. Instruction-set extensions such as x86 SSE and AVX and Arm NEON and SVE provide integer and floating-point lane operations, along with loads, shuffles and comparisons. In Flynn's taxonomy SIMD sits beside SISD, an ordinary sequential processor, and MIMD, multiple cores running independent instruction streams. Image filters, video codecs and matrix math typically speed up several-fold or more.
Compilers auto-vectorize loops that apply the same operation to each array element. The key condition is no loop-carried dependence: in a[i] = a[i-1] + b[i], each element needs the previous result, so lanes cannot run simultaneously. Data should be contiguous, and possible pointer overlap (aliasing) can make the compiler give up. A trip count unknown at compile time is not a barrier; the vector loop handles full chunks and a short remainder loop handles the rest. Media code also uses saturating arithmetic, where 8-bit signed 127 + 1 clamps to 127 instead of wrapping to −128.
An array of structures (AoS) stores each record's fields together, such as x, y, z and mass. A loop that reads only x then wastes most of each cache line and needs gather or shuffle work to fill vector lanes. A structure of arrays (SoA) keeps all x values contiguous, so every fetched line is fully used, memory traffic can drop sharply, and one vector load fills the lanes directly. The same layout lets adjacent GPU threads read adjacent addresses, which coalesces their memory accesses.
With CPU SIMD, the programmer or compiler explicitly uses vector instructions, so code is usually written with the vector width in mind. GPU SIMT (single instruction, multiple threads) lets the programmer write ordinary code for one thread; the hardware groups threads, commonly 32, to run in lockstep on shared instruction issue. When threads in a group branch differently, the hardware executes each path in turn with inactive threads masked, so code still works but efficiency drops. Underneath, both rely on the same principle of amortizing one instruction over many data elements.
Answer: C. In SIMT each thread can be written as an independent program and the hardware handles branches; with SIMD the programmer or compiler explicitly uses fixed-width vector instructions
CPU SIMD applies one instruction to a vector register holding 4 or 8 data items, so programs are written with the vector width in mind. With GPU SIMT the programmer writes ordinary code for a single thread, and the hardware bundles 32 threads to execute in lockstep. Threads may branch differently; the hardware executes the divergent paths one after another, though efficiency drops when it does.
Single instruction, multiple data: one instruction operates on several data elements packed into a wide register, such as four 32-bit numbers in a 128-bit register.
Common reasons are a loop-carried dependence where an iteration needs the previous one's result, non-contiguous memory access, or possible pointer aliasing that the compiler cannot rule out.
SIMD uses explicit fixed-width vector instructions on a CPU. SIMT, used by GPUs, runs scalar per-thread code on groups of threads in lockstep, with hardware handling branch divergence.
SIMD appears in 5 practice questions across 4 topics, including GPU Programming, Computer Arithmetic, CPUs and architecture.
As an Amazon Associate I earn from qualifying purchases.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.