Brute-force and approximate  K-Nearest Neighbors implemntations on CPU and GPUS.