Strategy and algorithms for the parallel solution of the nearest neighborhood problem in shared-memory processors

The neighborhood problem appears in many applications of computational geometry, computational mechanics, etc. In all these situations, the main requirement for a competitive implementation is performance, which can only be attained in modern hardware by exploiting parallelism. However, whereas the performance of serial algorithms is fairly predictable, that of parallel methods depends on delicate issues that have a huge impact (cache memory, cache misses, memory alignment, etc.), but are not easy to control. Even if there is not a simple approach to deal with these factors in shared-memory architectures, it is quite convenient to program parallel algorithms where the data are segregated on a per-thread basis. With this objective in mind, we propose a strategy to develop parallel algorithms based on a two-level design, and apply it to efficiently solve the nearest neighborhood problem. At a higher level, the proposed methods orchestrate the parallel algorithm and split the space into cells stored in a hash table; at the lower level, our methods hold serial search algorithms that are completely agnostic to the high-level counterpart. Using this strategy, we have developed a library combining different serial and parallel algorithms, optimized them, and assessed their performance. The analysis carried out allows to better understand the main bottlenecks in the algorithmic solution of the nearest neighborhood problem and come out with very fast implementations that improve existing available software.

[1]  D. Sulsky,et al.  A particle method for history-dependent materials , 1993 .

[2]  Nuno Faria,et al.  Impact of Data Structure Layout on Performance , 2013, 2013 21st Euromicro International Conference on Parallel, Distributed, and Network-Based Processing.

[3]  Darren Engwirda,et al.  Conforming restricted Delaunay mesh generation for piecewise smooth complexes , 2016, ArXiv.

[4]  Not Available Not Available Meshfree particle methods , 2000 .

[5]  M. Pharr,et al.  ispc: A SPMD compiler for high-performance CPU programming , 2012, 2012 Innovative Parallel Computing (InPar).

[6]  Jon Louis Bentley,et al.  Multidimensional binary search trees used for associative searching , 1975, CACM.

[7]  T. Belytschko,et al.  Element‐free Galerkin methods , 1994 .

[8]  Sartaj Sahni,et al.  Handbook of Data Structures and Applications , 2004 .

[9]  Darren Engwirda,et al.  Generalised primal-dual grids for unstructured co-volume schemes , 2017, J. Comput. Phys..

[10]  David Chisnall,et al.  C Is Not a Low-level Language , 2018, ACM Queue.

[11]  Steven Salzberg,et al.  A Weighted Nearest Neighbor Algorithm for Learning with Symbolic Features , 2004, Machine Learning.

[12]  Sunil Arya,et al.  An optimal algorithm for approximate nearest neighbor searching fixed dimensions , 1998, JACM.

[13]  Yury A. Malkov,et al.  Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs , 2016, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[14]  Martin Aumüller,et al.  ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms , 2018, SISAP.

[15]  David Chisnall C is not a low-level language , 2018, Commun. ACM.

[16]  J. Wrench Table errata: The art of computer programming, Vol. 2: Seminumerical algorithms (Addison-Wesley, Reading, Mass., 1969) by Donald E. Knuth , 1970 .

[17]  Colin L. McMaster,et al.  An analysis of algorithms for the Dutch National Flag Problem , 1978, CACM.

[18]  Ignacio Romero,et al.  A new approach for the solution of the neighborhood problem in meshfree methods , 2017, Engineering with Computers.

[19]  Alexandr Andoni,et al.  Near-Optimal Hashing Algorithms for Approximate Nearest Neighbor in High Dimensions , 2006, 2006 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS'06).

[20]  Holger Homann,et al.  SoAx: A generic C++ Structure of Arrays for handling particles in HPC codes , 2017, Comput. Phys. Commun..

[21]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[22]  Daniel C. Simkins,et al.  Efficient searching in meshfree methods , 2018, Computational Mechanics.