swh:1:snp:2d869aa00591d2ac8ec8e7abacdda563d413189d
Raw File
Tip revision: f140dbc8b05aa3d341c70436a1920a06df9a0ed4 authored by Roberto Di Cosmo on 02 May 2021, 17:11:46 UTC
Signal exceptions in the worker to the master process in the simplemapper skeleton.
Tip revision: f140dbc
topnat.ml
(* simple example to show how to use Parmap on the native toplevel *)
(* just run ocamlnat and then #use this file *)
#load "unix.cmxs";;
#load "bigarray.cmxs";;
#load "parmap.cmxs";;
let mkn n = let rec aux acc = function 0 -> acc | n -> aux (n::acc) (n-1) in aux [] n;;
Printf.printf "%d\n" (List.length (Parmap.parmap (fun x -> x+1) (Parmap.L (mkn 10000)) ~ncores:2));;
back to top