Array programming: Difference between revisions

Content deleted Content added
Rmv duplicate wiki links WP:DUPLINK
Scalar languages: mentioned how vectorization shows up in C
Line 42:
a(:,:) = a(:,:) + b(:,:)
</syntaxhighlight>
 
While scalar languages like C do not have native array programming elements as part of the language proper, this does not mean programs written in these languages never take advantage of the underlying techniques of vectorization (i.e., utilizing a CPU's [[SIMD|vector-based instructions]] if it has them or by using multiple CPU cores). Some C compilers like [[GNU Compiler Collection|GCC]] at some optimization levels detect and vectorize sections of code that its heuristics determine would benefit from it. Another approach is given by the [[OpenMP]] API, which allows one to parallelize applicable sections of code by taking advantage of multiple CPU cores.
 
===Array languages===