The prefix sum operation is a useful primitive with a broad range of applications. For database systems, it is a building block of many important operators including join, sort and filter queries. In this paper, we study different methods of computing prefix sums with SIMD instructions and multiple threads. For SIMD, we implement and compare horizontal and vertical computations, as well as a theoretically work-efficient balanced tree version using gather/scatter instructions. With multithreading, the memory bandwidth can become the bottleneck of prefix sum computations. We propose a new method that partitions data into cache-sized smaller partitions to achieve better data locality and reduce bandwidth demands from RAM. We also investigate four different ways of organizing the computation sub-procedures, which have different performance and usability characteristics. In the experiments we find that the most efficient prefix sum computation using our partitioning technique is up to 3x faster than two standard library implementations that already use SIMD and multithreading.
Parallelized Kendall's Tau Coefficient Computation via SIMD Vectorized Sorting On Many-Integrated-Core Processors
Georgia Institute of Technology(佐治亚理工学院)
成对关联度量是数据分析中的一个重要操作。Kendall的tau系数是一种广泛使用的相关系数,用于识别有序变量之间的非线性关系。本文研究了一种基于Intel Xeon Phis的单指令多数据(SIMD)向量化排序并行算法,该算法利用多个处理核和512位SIMD向量指令,加速所有对Kendall的tau系数计算。为了促进工作负载平衡和克服片上存储器的限制,我们提出了一个通用的框架,对称所有对计算之间的作业标识符和坐标空间的可证明双射函数。性能评估表明,我们的算法在一个5110 P Phi实现了两个数量级的加速比16线程的MATLAB和三个数量级的加速比顺序R,都运行在高端CPU。此外,我们的算法表现出相当好的分布式计算的可扩展性方面的Phis的数量。源代码和数据集可在http://lightpcc.sourceforge.net上公开获取。
A Case Study of LLVM-Based Analysis for Optimizing SIMD Code Generation
Oak Ridge National Laboratory(橡树岭国家实验室);Louisiana State University(路易斯安那州立大学);Lawrence Livermore National Laboratory(劳伦斯利弗莫尔国家实验室);Argonne National Laboratory(阿贡国家实验室)
An Optimal Level-synchronous Shared-memory Parallel BFS Algorithm with Optimal parallel Prefix-sum Algorithm and its Implications for Energy Consumption