Implement a GPU program that, for N three-dimensional points stored on the device, fills indices[i] with the index j ≠ i of the point closest to points[i]. Comparing squared Euclidean distance is sufficient—you do not need to compute square-roots.
solve function signature must remain unchangedindices array
Input: points = [(0,0,0), (1,0,0), (5,5,5)]
indices = [-1, -1, -1]
N = 3
Output: indices = [1, 0, 1] # 0⇆1 are nearest, 2 is closest to 1
N ≤ 100,000N = 10,000