if you've started using the new segmented scan implementation, you should make
note of a change that I've just made. Now, your scan_expr is responsible
for implementing segmentation. The scan routine will provide a bool flag
`across_seg_boundary` to indicate whether the scan update is taking
place across a segment boundary. The meaning of the two arguments `a`
and `b` has also been clarified: `a` is an increment, and `b` is the
value being incremented, potentially `across_seg_boundary`.
To keep existing code working, simply wrap your scan expression in
across_seg_boundary ? b : (original_scan_expr)
Since this is all still unreleased code, there are no facilities in
place to keep the old usage working. This became necessary in my use of
this code, where I wanted to do a segmented scan on some part of the
data and an unsegmented scan on another. This is now easily possible.
This is all also documented here:
Sorry for the incompatible change. I'd also welcome feedback.
Next, if you're writing scan code, this might come in handy:
It's a completely sequential scan kernel generator/runner, best run on a
CPU. It's meant to help isolate concurrency-related bugs from bugs in
the code snippets passed to scan. Its interface is exactly the same as
that of the parallel kernel generator/runner.