diff -Nru parmap-1.2.3/debian/changelog parmap-1.2.4/debian/changelog --- parmap-1.2.3/debian/changelog 2022-01-24 16:21:41.000000000 +0000 +++ parmap-1.2.4/debian/changelog 2022-02-20 17:00:43.000000000 +0000 @@ -1,8 +1,9 @@ -parmap (1.2.3-1build1) jammy; urgency=medium +parmap (1.2.4-1) unstable; urgency=medium - * No-change rebuild for ocaml abi changes. + * Team upload + * New upstream release - -- Matthias Klose Mon, 24 Jan 2022 17:21:41 +0100 + -- Stéphane Glondu Sun, 20 Feb 2022 18:00:43 +0100 parmap (1.2.3-1) unstable; urgency=medium diff -Nru parmap-1.2.3/debian/control parmap-1.2.4/debian/control --- parmap-1.2.3/debian/control 2021-11-30 06:57:41.000000000 +0000 +++ parmap-1.2.4/debian/control 2022-02-20 17:00:43.000000000 +0000 @@ -5,7 +5,7 @@ Uploaders: Mehdi Dogguy Build-Depends: debhelper-compat (= 13), - ocaml-nox, + ocaml, ocaml-dune, libdune-ocaml-dev, dh-ocaml diff -Nru parmap-1.2.3/dune-project parmap-1.2.4/dune-project --- parmap-1.2.3/dune-project 2021-05-02 17:11:46.000000000 +0000 +++ parmap-1.2.4/dune-project 2022-01-02 22:29:28.000000000 +0000 @@ -1,7 +1,7 @@ (lang dune 2.7) (name parmap) -(version 1.2.3) +(version 1.2.4) (generate_opam_files true) diff -Nru parmap-1.2.3/parmap.opam parmap-1.2.4/parmap.opam --- parmap-1.2.3/parmap.opam 2021-05-02 17:11:46.000000000 +0000 +++ parmap-1.2.4/parmap.opam 2022-01-02 22:29:28.000000000 +0000 @@ -1,4 +1,4 @@ -version: "1.2.3" +version: "1.2.4" # This file is generated by dune, edit dune-project instead opam-version: "2.0" synopsis: "Minimalistic library allowing to exploit multicore architecture" diff -Nru parmap-1.2.3/src/parmap.ml parmap-1.2.4/src/parmap.ml --- parmap-1.2.3/src/parmap.ml 2021-05-02 17:11:46.000000000 +0000 +++ parmap-1.2.4/src/parmap.ml 2022-01-02 22:29:28.000000000 +0000 @@ -718,11 +718,11 @@ array: the data in Bigarray is placed at offset 1 w.r.t. a normal array, so we get a pointer to that zone into arr_out_as_array, and have it typed as a float array *) - let barr_out_as_array = Array.unsafe_get (Obj.magic barr_out) 1 in + (*let barr_out_as_array = Array.unsafe_get (Obj.magic barr_out) 1 in*) let compute _ lo hi _ exc_handler = try for i=lo to hi do - Array.unsafe_set barr_out_as_array i (f i (Array.unsafe_get al i)) + Bigarray.Array1.unsafe_set barr_out i (f i (Array.unsafe_get al i)) done with e -> exc_handler e lo in diff -Nru parmap-1.2.3/src/setcore_stubs.c parmap-1.2.4/src/setcore_stubs.c --- parmap-1.2.3/src/setcore_stubs.c 2021-05-02 17:11:46.000000000 +0000 +++ parmap-1.2.4/src/setcore_stubs.c 2022-01-02 22:29:28.000000000 +0000 @@ -12,14 +12,26 @@ #include #include #include +#ifdef _WIN32 +#include +#endif +static int get_numcores() { +#ifdef _WIN32 + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + return sysinfo.dwNumberOfProcessors; +#else + return sysconf( _SC_NPROCESSORS_ONLN ); +#endif +} CAMLprim value numcores(value unit) { - int numcores = sysconf( _SC_NPROCESSORS_ONLN ); + int numcores = get_numcores(); return Val_int(numcores); } CAMLprim value setcore(value which) { - int numcores = sysconf( _SC_NPROCESSORS_ONLN ); + int numcores = get_numcores(); int w = Int_val(which) % numcores; // stay in the space of existing cores #if HAVE_DECL_SCHED_SETAFFINITY cpu_set_t cpus;