Calculate squared Euclidean distance matrix on GPU
问题 Let p be a matrix of first set of locations where each row gives the coordinates of a particular point. Similarly, let q be a matrix of second set of locations where each row gives the coordinates of a particular point. Then formula for pairwise squared Euclidean distance is: k(i,j) = (p(i,:) - q(j,:))*(p(i,:) - q(j,:))', where p(i,:) denotes i -th row of matrix p , and p' denotes the transpose of p . I would like to compute matrix k on CUDA-enabled GPU (NVidia Tesla) in C++. I have OpenCV v