OpenACC Based GPU Parallelization of Plane Sweep Algorithm for Geometric Intersection

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11381)


Line segment intersection is one of the elementary operations in computational geometry. Complex problems in Geographic Information Systems (GIS) like finding map overlays or spatial joins using polygonal data require solving segment intersections. Plane sweep paradigm is used for finding geometric intersection in an efficient manner. However, it is difficult to parallelize due to its in-order processing of spatial events. We present a new fine-grained parallel algorithm for geometric intersection and its CPU and GPU implementation using OpenMP and OpenACC. To the best of our knowledge, this is the first work demonstrating an effective parallelization of plane sweep on GPUs.

We chose compiler directive based approach for implementation because of its simplicity to parallelize sequential code. Using Nvidia Tesla P100 GPU, our implementation achieves around 40X speedup for line segment intersection problem on 40K and 80K data sets compared to sequential CGAL library.


Plane sweep Line segment intersection Directive based programming OpenMP OpenACC 



This work is partly supported by the National Science Foundation CRII Grant No. 1756000. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan X Pascal GPU used for this research. We also acknowledge XSEDE for providing access to NVidia Tesla P100 available in PSC Bridges cluster.


  1. 1.
    Agarwal, D., Puri, S., He, X., Prasad, S.K.: A system for GIS polygonal overlay computation on linux cluster - an experience and performance report. In: 26th IEEE International Parallel and Distributed Processing Symposium Workshops & PhD Forum, IPDPS 2012, Shanghai, China, 21–25 May 2012, pp. 1433–1439 (2012).
  2. 2.
    Aghajarian, D., Prasad, S.K.: A spatial join algorithm based on a non-uniform grid technique over GPGPU. In: Proceedings of the 25th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, p. 56. ACM (2017)Google Scholar
  3. 3.
    Atallah, M.J., Goodrich, M.T.: Efficient plane sweeping in parallel. In: Proceedings of the Second Annual Symposium on Computational Geometry, pp. 216–225. ACM (1986)Google Scholar
  4. 4.
    Audet, S., Albertsson, C., Murase, M., Asahara, A.: Robust and efficient polygon overlay on parallel stream processors. In: Proceedings of the 21st ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 304–313. ACM (2013)Google Scholar
  5. 5.
    Bentley, J.L., Ottmann, T.A.: Algorithms for reporting and counting geometric intersections. IEEE Trans. Comput. 9, 643–647 (1979)CrossRefGoogle Scholar
  6. 6.
    Franklin, W.R., Narayanaswami, C., Kankanhalli, M., Sun, D., Zhou, M.C., Wu, P.Y.: Uniform grids: a technique for intersection detection on serial and parallel machines. In: Proceedings of Auto Carto, vol. 9, pp. 100–109. Citeseer (1989)Google Scholar
  7. 7.
    Goodrich, M.T.: Intersecting line segments in parallel with an output-sensitive number of processors. SIAM J. Comput. 20(4), 737–755 (1991)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Goodrich, M.T., Ghouse, M.R., Bright, J.: Sweep methods for parallel computational geometry. Algorithmica 15(2), 126–153 (1996)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Khlopotine, A.B., Jandhyala, V., Kirkpatrick, D.: A variant of parallel plane sweep algorithm for multicore systems. IEEE Trans. Comput.-Aided Des. Integr. Circ. Syst. 32(6), 966–970 (2013)CrossRefGoogle Scholar
  10. 10.
    McKenney, M., Frye, R., Dellamano, M., Anderson, K., Harris, J.: Multi-core parallelism for plane sweep algorithms as a foundation for GIS operations. GeoInformatica 21(1), 151–174 (2017)CrossRefGoogle Scholar
  11. 11.
    McKenney, M., De Luna, G., Hill, S., Lowell, L.: Geospatial overlay computation on the GPU. In: Proceedings of the 19th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 473–476. ACM (2011)Google Scholar
  12. 12.
    McKenney, M., McGuire, T.: A parallel plane sweep algorithm for multi-core systems. In: Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 392–395. ACM (2009)Google Scholar
  13. 13.
    OSM: OpenStreet Map Data (2017).
  14. 14.
    Prasad, S., et al.: Parallel processing over spatial-temporal datasets from geo, bio, climate and social science communities: a research roadmap. In: 6th IEEE International Congress on Big Data, Hawaii (2017)Google Scholar
  15. 15.
    Puri, S., Prasad, S.K.: A parallel algorithm for clipping polygons with improved bounds and a distributed overlay processing system using MPI. In: 2015 15th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid)(CCGRID), pp. 576–585, May 2015.
  16. 16.
    Puri, S., Paudel, A., Prasad, S.K.: MPI-vector-IO: parallel I/O and partitioning for geospatial vector data. In: Proceedings of the 47th International Conference on Parallel Processing, ICPP 2018, pp. 13:1–13:11. ACM, New York (2018).
  17. 17.
    Puri, S., Prasad, S.K.: Output-sensitive parallel algorithm for polygon clipping. In: 43rd International Conference on Parallel Processing, ICPP 2014, Minneapolis, MN, USA, 9–12 September 2014, pp. 241–250 (2014).

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of Mathematics, Statistics and Computer ScienceMarquette UniversityMilwaukeeUSA

Personalised recommendations