One of the more common
algorithm used to find the closest pair is the Brute-force algorithm; which is calculating the distances of all the point ( O(n^2) notation):
n=total number of
then simply look for the pair of points that has the smallest distance between each other. However, this algorithm was evident to be slow.
This is the function used in the closestPair.c program that Stephanie used for
here assignment 1:
double brute_force(point* pts, int max_n, point *a, point *b)
This the profile:
As a consequence, we presume
“parallellazing” this algorithm using CUDA technology will speed up the process significantly.
Github link [https://github.com/sezar-gantous/GPU610-ClosestPair here]
=== Assignment 3 ===