Parallel_arrays.Scanval scan :
Parallel_kernel.t @ local ->
('a t ->
(init:'a ->
(f:
(Parallel_kernel.t @ local ->
('a @ shared ->
('a @ shared ->
'a) @ local) @ local) @ shareable ->
'a t * 'a) @ local) @ local) @ localscan parallel t ~init ~f initialises an array containing the exclusive prefix sums of t with respect to f. The first element is init and the full reduction of t is returned separately. f must be associative and f init x must equal x.
val scan_inclusive :
Parallel_kernel.t @ local ->
('a t ->
(init:'a ->
(f:
(Parallel_kernel.t @ local ->
('a @ shared ->
('a @ shared ->
'a) @ local) @ local) @ shareable ->
'a t) @ local) @ local) @ localscan_inclusive parallel t ~init ~f initialises an array containing the inclusive prefix sums of t with respect to f. The first element is the first element of t. f must be associative and f init x must equal x.