Vectorization (parallel Computing) - Techniques

Techniques

An example would be a program to multiply two vectors of numeric data. A scalar approach would be something like:

for (i = 0; i < 1024; i++) C = A*B;

This could be vectorized to look something like:

for (i = 0; i < 1024; i+=4) C = A*B;

Here, C represents the four array elements from C to C and the vector processor can perform four operations for a single vector instruction. Since the four vector operations complete in roughly the same time like one scalar instruction, the vector approach can run up to four times faster than the original code.

There are two distinct compiler approaches: one based on conventional vectorization technique and the other based on loop unrolling.

Read more about this topic:  Vectorization (parallel Computing)

Famous quotes containing the word techniques:

    The techniques of opening conversation are universal. I knew long ago and rediscovered that the best way to attract attention, help, and conversation is to be lost. A man who seeing his mother starving to death on a path kicks her in the stomach to clear the way, will cheerfully devote several hours of his time giving wrong directions to a total stranger who claims to be lost.
    John Steinbeck (1902–1968)

    It is easy to lose confidence in our natural ability to raise children. The true techniques for raising children are simple: Be with them, play with them, talk to them. You are not squandering their time no matter what the latest child development books say about “purposeful play” and “cognitive learning skills.”
    Neil Kurshan (20th century)