swh:1:snp:2d869aa00591d2ac8ec8e7abacdda563d413189d
Raw File
Tip revision: 9f1f03ad692f3e98e2c3cb447a54de88e8353b0e authored by Roberto Di Cosmo on 15 May 2014, 14:59:44 UTC
fixed mandir
Tip revision: 9f1f03a
topnat.ml
(* simple exemple 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