Vectorization of the Integer Calculations in the Graph Decomposition Problem
摘要
The article is devoted to the problem of integer calculations vectorization. Integer calculations is a program context which mainly works with integers and contains a large number of control transfer operations. Such a program context is often found in combinatorial optimization problems where one has to work with discrete data structures, memory access indirection, and loop nests with an irregular number of iterations. These factors negatively affect the use of vectorization, and automatic vectorization is almost impossible for such a context. The article discusses the possibility of using the AVX-512 instructions set to vectorized code with the listed features, since the advantages of masked vector operations make it possible to achieve acceleration even in the presence of such bottlenecks. The application of vectorization is considered using the example of a bubble growth algorithm for graph decomposition, where the graph is represented as lists of vertex adjacencies. For the algorithm under consideration, a method is described for applying vectorization to loop nests using integer masked vector instructions from the AVX-512F set. The vectorized decomposition algorithm has been tested on graphs with up to 4 million vertices. Practical results were obtained on an Intel Xeon Phi 7290 Knights Landing microprocessor, and they demonstrated acceleration of the program code in the range of 1.7–2.2 times, depending on the size of the computational mesh.