CudaChain:一种实用的GPU加速二维凸包算法
CudaChain: A Practical GPU-accelerated 2D Convex Hull Algorithm
摘要:
提出了一种实用的GPU加速凸包算法和一种基于排序的平面点集预处理方法。该算法由两个阶段组成:(1)在GPU上进行两轮预处理;(2)在CPU上完成期望凸包的计算。我们首先丢弃位于由四个端点形成的四边形内的内部点,然后将剩余的点分布到几个(通常是四个)子区域中。对于每个点的子集,我们首先对它们进行并行排序,然后使用SPA进行第二轮丢弃,最后为当前剩余的点形成一个简单的链。通过直接连接子区域中的所有链,可以很容易地生成简单的多边形。最后通过计算简单多边形的凸包来获得输入点的期望凸包。我们使用Thrust库来实现并行排序、约简和分区,以提高效率和简单性。实验结果表明,该算法在20 M点的情况下,比Qhull算法有5 ~ 6倍的加速比。因此,该算法简单,效率高,在实际应用中具有一定的竞争力。
英文摘要:
This paper presents a practical GPU-accelerated convex hull algorithm and a novel Sorting-based Preprocessing Approach (SPA) for planar point sets. The proposed algorithm consists of two stages: (1) two rounds of preprocessing performed on the GPU and (2) the finalization of calculating the expected convex hull on the CPU. We first discard the interior points that locate inside a quadrilateral formed by four extreme points, and then distribute the remaining points into several (typically four) sub regions. For each subset of points, we first sort them in parallel, then perform the second round of discarding using SPA, and finally form a simple chain for the current remaining points. A simple polygon can be easily generated by directly connecting all the chains in sub regions. We at last obtain the expected convex hull of the input points by calculating the convex hull of the simple polygon. We use the library Thrust to realize the parallel sorting, reduction, and partitioning for better efficiency and simplicity. Experimental results show that our algorithm achieves 5x ~ 6x speedups over the Qhull implementation for 20M points. Thus, this algorithm is competitive in practical applications for its simplicity and satisfied efficiency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。