added up / down sweep operations in MPI scan