indexing data points in batch with CUDA.