Do not use thrust::fill(), as it may have problems with managed vectors.