A library for perfoming irregular segmented operations in Futhark.
For regular segments, just use map
.
$ futhark pkg add github.com/diku-dk/segmented
$ futhark pkg sync
> import "lib/github.com/diku-dk/segmented/segmented"
> segmented_reduce (+) 0 [true,false,false,true,false] (iota 5)
[3i32, 7i32]