The Convex Hull algorithm is one of the most important algorithms in computational geometry, with many applications such as in computer graphics, robotics, and data mining. Despite the advances in the new algorithms in this area, it is often needed to improve the performance to solve more significant problems quickly or in real-time processing. This work presents an experimental evaluation of GPU filters to reduce the cost of computing the 2D convex hull. The technique first performs a preprocessing of the input set, filtering all points within an eight-vertex polygon in logarithmic time, to obtain a reduced set of candidate points. We use parallel computation and the use of the Manhattan distance as a metric to find the vertices of the polygon and perform the point filtering. For the filtering stage we study different approaches; from custom CUDA kernels to libraries such as Thrust and CUB. Three types of point distributions are tested: a normal distribution (favorable case), circumference (the worst case), and a case where points are shifted randomly from the circumference (intermediate case). Experimental evaluation shows that the GPU filtering algorithm can be up to 23x faster than a sequential CPU implementation, and the whole convex hull computation can be up to 30x faster than the fastest implementation provided by the CGAL library.
翻译:凸壳算法是计算几何中最重要算法之一,广泛应用于计算机图形学、机器人学和数据挖掘等领域。尽管该领域新算法层出不穷,但为快速解决更大规模问题或实现实时处理,性能提升的需求依然迫切。本文对用于降低二维凸壳计算成本的GPU滤波器进行了实验评估。该技术首先对输入点集进行预处理,在对数时间内过滤掉位于八顶点多边形内部的所有点,从而获得缩减后的候选点集。我们采用并行计算,并以曼哈顿距离作为度量标准来寻找多边形顶点并执行点过滤。在过滤阶段,我们研究了不同方法——从自定义CUDA内核到Thrust和CUB等库。实验测试了三种点分布类型:正态分布(有利情况)、圆周分布(最差情况)以及从圆周随机偏移点的中间情况。实验评估表明,GPU过滤算法相比顺序CPU实现可加速高达23倍,而完整凸壳计算相比CGAL库提供的最快实现可加速高达30倍。