Parallel_arrays.Reduceval iter :
Parallel_kernel.t @ local ->
('a t ->
(f:(Parallel_kernel.t @ local -> ('a -> Base.unit) @ local) @ shareable ->
Base.unit) @ local) @ localiter parallel t ~f applies f to each element of t.
val iteri :
Parallel_kernel.t @ local ->
('a t ->
(f:
(Parallel_kernel.t @ local ->
(Base.int ->
('a ->
Base.unit) @ local) @ local) @ shareable ->
Base.unit) @ local) @ localiteri parallel t ~f applies f to each element of t and its index.
val find :
Parallel_kernel.t @ local ->
('a t ->
(f:(Parallel_kernel.t @ local -> ('a -> Base.bool) @ local) @ shareable ->
'a Base.option) @ local) @ localfind parallel t ~f returns the first element of t for which f returns true, if it exists. f will always be applied to every element of t.
val findi :
Parallel_kernel.t @ local ->
('a t ->
(f:
(Parallel_kernel.t @ local ->
(Base.int ->
('a ->
Base.bool) @ local) @ local) @ shareable ->
'a Base.option) @ local) @ localfindi parallel t ~f returns the first element of t for which f returns true, if it exists. f will always be applied to every element of t and its index.
val reduce :
Parallel_kernel.t @ local ->
('a t ->
(f:
(Parallel_kernel.t @ local ->
('a @ shared ->
('a @ shared ->
'a) @ local) @ local) @ shareable ->
'a Base.option) @ local) @ localreduce parallel t ~f folds f over the elements of t. f must be associative. If t is empty, reduce returns None.
val min_elt :
Parallel_kernel.t @ local ->
('a t ->
(compare:
(Parallel_kernel.t @ local ->
('a @ local shared ->
('a @ local shared ->
Base.int) @ local) @ local) @ shareable ->
'a Base.option) @ local) @ localmin_elt parallel t ~compare is the minimum element of t according to compare. If t is empty, returns None.
val max_elt :
Parallel_kernel.t @ local ->
('a t ->
(compare:
(Parallel_kernel.t @ local ->
('a @ local shared ->
('a @ local shared ->
Base.int) @ local) @ local) @ shareable ->
'a Base.option) @ local) @ localmax_elt parallel t ~compare is the maximum element of t according to compare. If t is empty, returns None.
val fold :
Parallel_kernel.t @ local ->
('a t @ shared ->
(init:(Base.unit -> 'acc) @ portable ->
(f:
(Parallel_kernel.t @ local ->
('acc ->
('a @ shared ->
'acc) @ local) @ local) @ shareable ->
(combine:
(Parallel_kernel.t @ local -> ('acc -> ('acc -> 'acc) @ local) @ local) @ shareable ->
'acc) @ local) @ local) @ local) @ local @@ portablefold parallel t ~init ~f ~combine folds combine over the result of map parallel t ~f. combine must be associative and combine init x must equal x.
val foldi :
Parallel_kernel.t @ local ->
('a t @ shared ->
(init:(Base.unit -> 'acc) @ portable ->
(f:
(Parallel_kernel.t @ local ->
(Base.int ->
('acc ->
('a @ shared ->
'acc) @ local) @ local) @ local) @ shareable ->
(combine:
(Parallel_kernel.t @ local -> ('acc -> ('acc -> 'acc) @ local) @ local) @ shareable ->
'acc) @ local) @ local) @ local) @ local @@ portablefoldi parallel t ~init ~f ~combine folds combine over the result of mapi parallel t ~f. combine must be associative and combine init x must equal x.