Scan

Scan operations are useful when working with prefix sums.

exclusive_scan: computes the exclusive prefix sum using a binary operation

  • Behaves similar to std::reduce, but provides a range of all prefix sums
  • excludes the last element in each iteration