A parallel reduction combines values with an associative operation, such as or , by a tree of combinations: work , span . The prefix sum, or scan, of is the sequence of running totals: inclusive, at position , or exclusive, , which starts with 0.
scan.rs prints it; shaded cells written in that round, even when the value stays the same. After the up-sweep the last cell holds the total, 133; it is replaced by 0 and the down-sweep ends with the exclusive running totals.