合并路径-一种直观的并行合并方法
Merge Path - A Visually Intuitive Approach to Parallel Merging
摘要:
合并两个已排序数组是排序和其他函数的重要构建块。其高效的并行化要求在计算核心之间平衡负载,最大限度地减少并行化带来的额外工作,并最大限度地减少线程间同步要求。有效使用内存也很重要。我们提出了一种新颖的、视觉上直观的方法,将两个输入排序数组划分为成对的连续元素序列,每个数组一个,使得1)每对包括任何所需的元素总数,以及2)每对的元素在输出合并排序数组中形成连续序列。虽然所得到的分区和计算复杂性类似于某些以前的算法,我们的方法是不同的,非常直观,并提供了有趣的见解。在此基础上,我们提出了一个无同步,高速缓存效率的合并(和排序)算法。虽然我们使用共享内存架构作为基础,我们的算法很容易适应其他架构。事实上,我们的方法甚至与高速缓存高效顺序排序有关。算法,以及重要的高速缓存相关的见解。
英文摘要:
Merging two sorted arrays is a prominent building block for sorting and other functions. Its efficient parallelization requires balancing the load among compute cores, minimizing the extra work brought about by parallelization, and minimizing inter-thread synchronization requirements. Efficient use of memory is also important. We present a novel, visually intuitive approach to partitioning two input sorted arrays into pairs of contiguous sequences of elements, one from each array, such that 1) each pair comprises any desired total number of elements, and 2) the elements of each pair form a contiguous sequence in the output merged sorted array. While the resulting partition and the computational complexity are similar to those of certain previous algorithms, our approach is different, extremely intuitive, and offers interesting insights. Based on this, we present a synchronization-free, cache-efficient merging (and sorting) algorithm. While we use a shared memory architecture as the basis, our algorithm is easily adaptable to additional architectures. In fact, our approach is even relevant to cache-efficient sequential sorting. The algorithms are presented, along with important cache-related insights.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。