TFML TinyFastMachineLearning Library. I share these code to save your time and money. gpukmeans.m A SUPER FAST k-means on GPU, for matlab: tic; gpukmeans(randn(100000,1000),256,[]); toc; Elapsed time is 7.571514 seconds. GTX Titan