- Make sure cuda error returned by cub scan is caught. - Avoid temporary buffer allocation in thrust device vector.