问题
Given a collection of thousands of points in 3D, I need to get the list of neighbours for each particle that fall inside some cutoff value (in terms of euclidean distance), and if possible, sorted from nearest fo farthest.
Which is the fastest GPU algorithm for this purpose in the CUDA or OpenCL languages?
回答1:
One of the fastest GPU MD codes I'm aware of, HALMD, uses a (highly tuned) version of the same sort of approach that is used in the CUDA SDK examples, "Particles". Both the HALMD paper and the Particles whitepaper are very clearly written. The underling algorithm is to assign particles into cutoff-radius-sized bins, do a radix sort based on that index, and then look at particles in the neighbouring bins.
回答2:
Fast k Nearest Neighbor Search using GPU
I haven't tested, used it, nothing. I just googled and posted the first link I found.
来源:https://stackoverflow.com/questions/6736072/best-gpu-algorithm-for-calculating-lists-of-neighbours