fix issue so that the check idx<nthreads is correct in gpu_find. Now gpu is fastest