Parallel_arrays.Inplaceval map_inplace :
Parallel_kernel.t @ local ->
('a t ->
(f:(Parallel_kernel.t @ local -> ('a -> 'a) @ local) @ shareable ->
Base.unit) @ local) @ local @@ portablemap_inplace parallel t ~f overwrites an array with the result of f applied to each of its elements.
val mapi_inplace :
Parallel_kernel.t @ local ->
('a t ->
(f:
(Parallel_kernel.t @ local -> (Base.int -> ('a -> 'a) @ local) @ local) @ shareable ->
Base.unit) @ local) @ local @@ portablemapi_inplace parallel t ~f overwrites an array with the result of f applied to each of its elements and their indices.
val init_inplace :
Parallel_kernel.t @ local ->
('a t ->
(f:(Parallel_kernel.t @ local -> (Base.int -> 'a) @ local) @ shareable ->
Base.unit) @ local) @ local @@ portableinit_inplace parallel t ~f overwrites an array with the result of f applied to each array index. This can be much faster than using mapi_inplace since it does not need to read the array.
val sort_inplace :
Parallel_kernel.t @ local ->
('a t ->
(compare:
(Parallel_kernel.t @ local ->
('a @ local shared ->
('a @ local shared ->
Base.int) @ local) @ local) @ shareable ->
Base.unit) @ local) @ local @@ portablesort_inplace parallel t ~compare unstably sorts t with respect to compare.
val stable_sort_inplace :
Parallel_kernel.t @ local ->
('a t ->
(compare:
(Parallel_kernel.t @ local ->
('a @ local shared ->
('a @ local shared ->
Base.int) @ local) @ local) @ shareable ->
Base.unit) @ local) @ local @@ portablestable_sort_inplace parallel t ~compare stably sorts t with respect to compare.
val scan_inplace :
Parallel_kernel.t @ local ->
('a t ->
(init:'a ->
(f:
(Parallel_kernel.t @ local ->
('a @ shared ->
('a @ shared ->
'a) @ local) @ local) @ shareable ->
'a) @ local) @ local) @ local @@ portablescan_inplace parallel t ~init ~f overwrites t to contain the its exclusive prefix sums with respect to f. The first element becomes init and the full reduction of t is returned. f must be associative and f init x must equal x.
val scan_inclusive_inplace :
Parallel_kernel.t @ local ->
('a t ->
(init:'a ->
(f:
(Parallel_kernel.t @ local ->
('a @ shared ->
('a @ shared ->
'a) @ local) @ local) @ shareable ->
Base.unit) @ local) @ local) @ local @@ portablescan_inclusive_inplace parallel t ~init ~f overwrites t to contain its inclusive prefix sums with respect to f. The first element is unchanged. f must be associative and f init x must equal x.