Revision f4984e232f2c2c5299b363f3111ea04c9a71d98b authored by Roberto Di Cosmo on 15 November 2011, 15:56:14 UTC, committed by Roberto Di Cosmo on 15 November 2011, 15:56:14 UTC
1 parent 4bf67ea
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 "extlib/extLib.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