Revision d6688ca5d2606b5f53be9cf3e3276608e6205437 authored by Roberto Di Cosmo on 12 October 2014, 16:39:07 UTC, committed by Roberto Di Cosmo on 12 October 2014, 16:39:07 UTC
1 parent 599878e
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