Revision 497b7a930072c2a992291f5ed7632698cd01027f authored by Roberto Di Cosmo on 27 January 2012, 09:33:41 UTC, committed by Roberto Di Cosmo on 27 January 2012, 17:37:19 UTC
1 parent 5b8fcdc
Raw File
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