Revision 997ca994ff01c49e6e42d3e05a92d24a10eba686 authored by Xavier Clerc on 10 October 2014, 09:10:20 UTC, committed by Xavier Clerc on 10 October 2014, 09:10:20 UTC
1 parent aa2270a
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