Sorts N=100 but not N=1000. Also has invalid device pointer error.