Parallel_arrays.MapMapping functions do not need to be templated over the mode of their output type. To work with a contended or shared 'b, return a 'b Modes.Contended.t or 'b Modes.Shared.t.
val map :
Parallel_kernel.t @ local ->
('a t ->
(f:(Parallel_kernel.t @ local -> ('a -> 'b) @ local) @ shareable ->
'b t) @ local) @ localmap parallel t ~f initializes an array with the result of f applied to each element of t.
val mapi :
Parallel_kernel.t @ local ->
('a t ->
(f:
(Parallel_kernel.t @ local -> (Base.int -> ('a -> 'b) @ local) @ local) @ shareable ->
'b t) @ local) @ localmapi parallel t ~f initializes an array with the result of f applied to each element of t and its index.
val map2_exn :
Parallel_kernel.t @ local ->
('a t ->
('b t ->
(f:
(Parallel_kernel.t @ local -> ('a -> ('b -> 'c) @ local) @ local) @ shareable ->
'c t) @ local) @ local) @ localmap2_exn parallel t0 t1 ~f initializes an array with the result of f applied to each pair of elements of t0, t1. Raises if t0 and t1 do not have equal lengths.
val mapi2_exn :
Parallel_kernel.t @ local ->
('a t ->
('b t ->
(f:
(Parallel_kernel.t @ local ->
(Base.int ->
('a ->
('b ->
'c) @ local) @ local) @ local) @ shareable ->
'c t) @ local) @ local) @ localmapi2_exn parallel t0 t1 ~f initializes an array with the result of f applied to each pair of element of t0, t1 and their index. Raises if t0 and t1 do not have equal lengths.