swh:1:snp:2d869aa00591d2ac8ec8e7abacdda563d413189d
Raw File
Tip revision: 5b8fcdc2d5585096b98c8287b99aeb0e1747caf5 authored by Roberto Di Cosmo on 25 January 2012, 16:50:25 UTC
Adapted configure and Makefile_3.11.in to OCaml compilers without support
Tip revision: 5b8fcdc
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