swh:1:snp:2d869aa00591d2ac8ec8e7abacdda563d413189d
Raw File
Tip revision: 312998462027e0ca6278d0eed3bc36ae9099db8d authored by Drup on 17 January 2020, 15:49:41 UTC
Version and fix parmap.opam
Tip revision: 3129984
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