Automatic Vectorization
Jump to navigation
Jump to search
An Automatic Vectorization is a Parallel Computing that ...
- See: C (Programming Language), Compiler, Parallel Computing, Parallelization, Computer Program, Scalar (Computing), Operand, Array Data Structure, Supercomputers, Vector Processing, SIMD, SPMD.
References
2017
- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/automatic_vectorization Retrieved:2017-6-26.
- Automatic vectorization, in parallel computing, is a special case of automatic parallelization, where a computer program is converted from a scalar implementation, which processes a single pair of operands at a time, to a vector implementation, which processes one operation on multiple pairs of operands at once. For example, modern conventional computers, including specialized supercomputers, typically have vector operations that simultaneously perform operations such as the following four additions (via SIMD or SPMD hardware): : [math]\displaystyle{ \begin{align} c_1 & = a_1 + b_1 \\ c_2 & = a_2 + b_2 \\ c_3 & = a_3 + b_3 \\ c_4 & = a_4 + b_4 \end{align} }[/math] However, in most programming languages one typically writes loops that sequentially perform additions of many numbers. Here is an example of such a loop, written in C:
<source lang="c">
for (i=0; i<n; i++)
c[i] = a[i] + b[i];
</source>
A vectorizing compiler transforms such loops into sequences of vector operations. These vector operations perform additions on length-four (in our example) blocks of elements from the arrays
a
,b
andc
. Automatic vectorization is a major research topic in computer science.
- Automatic vectorization, in parallel computing, is a special case of automatic parallelization, where a computer program is converted from a scalar implementation, which processes a single pair of operands at a time, to a vector implementation, which processes one operation on multiple pairs of operands at once. For example, modern conventional computers, including specialized supercomputers, typically have vector operations that simultaneously perform operations such as the following four additions (via SIMD or SPMD hardware): : [math]\displaystyle{ \begin{align} c_1 & = a_1 + b_1 \\ c_2 & = a_2 + b_2 \\ c_3 & = a_3 + b_3 \\ c_4 & = a_4 + b_4 \end{align} }[/math] However, in most programming languages one typically writes loops that sequentially perform additions of many numbers. Here is an example of such a loop, written in C: