Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N10 2016 year

DOI: 10.17587/prin.7.435-445
Directive and Automatic Loop Vectorization
N. I. Vyukova, niva@niisi.ras.ru, V. A. Galatenko, galat@niisi.ras.ru, S. V. Samborskij, sambor@niisi.ras.ru, Federal State Institution Scientific Research Institute of System Analysis of the Russian Academy of Science, Moscow, 117218, Russian Federation
Corresponding author: Galatenko Vladimir A., Head of Sector, Federal State Institution Scientific Research Institute of System Analysis of the Russian Academy of Science, Moscow, 117218, Russian Federation, e-mail: galat@niisi.ras.ru
Received on July 26, 2016
Accepted on July 29, 2016

Nearly all todays computer platforms include Single Instruction Multiple Data (SIMD) extensions. The SIMD model allows for exploiting the data level parallelism present in computationally intensive applications. The auto-vectorization techniques became common in modern compilers. However the compilers ability for auto-vectorization is limited with certain requirements of language standards, lack of information about data dependencies and alignment and other factors. A programmer can assist the compiler by providing explicit vectorization directives with parameters specifying the properties of data and operations essential for the vectorization process. This opens the opportunities for effective vectorization of a much wider spectrum of loops. The purpose of this paper is to evaluate and compare some available implementations of automatic and directive vectorization. The capabilities of automatic vectorization are presented with recent versions of GCC. The facilities of directive vectorization are exemplified with the features of the OpenMP 4.0 standard implemented in GCC and the source-to source vectorizing preprocessor named Scout. We analyze the results of applying the above tools to a number of program loops with various specific features (presence of conditional computations, function calls, noncontiguous memory access, nested loops) and evaluate the advantages and limitations of each tool. In the conclusion an approach to their conjoint usage is proposed.

Keywords: vector extensions, SIMD (Single Instruction Multiple Data), vectorization, explicit vector programming, Scout, OpenMP
pp. 435–445
For citation:
Vyukova N. I., Galatenko V. A., Samborskij S. V. Directive and Automatic Loop Vectorization, Programmnaya Ingeneria, 2016, vol. 7, no. 10, pp. 435—445.