Extremely naïve implementation of algorithm on GPU