Automatic vectorization is a compiler transformation that converts a scalar implementation of a program, which processes a single pair of operands at a time, into a vector implementation that applies one operation to many pairs of operands at once on SIMD or similar hardware. It is a special case of automatic parallelization and is applied mainly to loops, because programs spend most of their time inside loops. The compiler first builds a dependency graph of the statements and uses loop dependence analysis, helped by alias analysis, to decide which loops are safe to vectorize. It then rewrites suitable instructions as vector instructions of instruction sets such as SSE, AVX, AltiVec, NEON, SVE and the RISC-V Vector Extension. The result must preserve program behavior exactly, so data dependencies and integer precision have to be respected, and the IEEE-754 floating-point rules often block the vectorization of reductions unless the programmer lets the compiler reassociate the operations. Vectorizing can also slow a program down, for example through data-movement timing.
Connections
In Field
Source Automatic vectorization (Wikipedia)
Sources
Automatic vectorization (Wikipedia)
In Field: Parallel Computing, Lead
Automatic vectorization, in parallel computing, is a special case of automatic parallelization
In Group: Concurrency and Distributed Systems Techniques, Lead
Automatic vectorization, in parallel computing, is a special case of automatic parallelization
View the SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.