File tree Expand file tree Collapse file tree 6 files changed +47
-21
lines changed Expand file tree Collapse file tree 6 files changed +47
-21
lines changed Original file line number Diff line number Diff line change 15
15
- ubuntu-latest
16
16
- macos-latest
17
17
ocaml-compiler :
18
- - ocaml-base-compiler. 5.0.0~beta1
18
+ - 5.0.x
19
19
- ocaml-variants.5.1.0+trunk
20
20
21
21
runs-on : ${{ matrix.os }}
25
25
26
26
steps :
27
27
- name : Checkout code
28
- uses : actions/checkout@v2
28
+ uses : actions/checkout@v3
29
29
30
30
- name : Get latest OCaml commit hash
31
31
id : multicore_hash
Original file line number Diff line number Diff line change
1
+ # This file is generated by dune, edit dune-project instead
1
2
opam-version: "2.0"
2
- maintainer: "KC Sivaramakrishnan <
[email protected] >"
3
+ synopsis: "Parallel Structures over Domains for Multicore OCaml"
4
+ maintainer: ["KC Sivaramakrishnan <
[email protected] >"]
3
5
authors: ["KC Sivaramakrishnan <
[email protected] >"]
6
+ license: "ISC"
4
7
homepage: "https://github.com/ocaml-multicore/domainslib"
5
8
doc: "https://kayceesrk.github.io/domainslib/doc"
6
- synopsis: "Parallel Structures over Domains for Multicore OCaml"
7
- license: "ISC"
8
- dev-repo: "git+https://github.com/ocaml-multicore/domainslib.git"
9
9
bug-reports: "https://github.com/ocaml-multicore/domainslib/issues"
10
- tags: []
11
10
depends: [
12
- "ocaml" {>= "5.00"}
13
11
"dune" {>= "3.0"}
14
- "lockfree" { >= "0.2.0"}
15
- "mirage-clock-unix" {with-test}
12
+ "ocaml" {>= "5.0"}
13
+ "lockfree" {>= "0.2.0"}
14
+ "mirage-clock-unix" {with-test & >= "4.2.0"}
16
15
"qcheck-core" {with-test & >= "0.20"}
17
16
"qcheck-multicoretests-util" {with-test & >= "0.1"}
18
17
"qcheck-stm" {with-test & >= "0.1"}
18
+ "odoc" {with-doc}
19
19
]
20
- depopts: []
21
20
build: [
22
- "dune" "build" "-p" name
21
+ ["dune" "subst"] {dev}
22
+ [
23
+ "dune"
24
+ "build"
25
+ "-p"
26
+ name
27
+ "-j"
28
+ jobs
29
+ "@install"
30
+ "@runtest" {with-test}
31
+ "@doc" {with-doc}
32
+ ]
23
33
]
34
+ dev-repo: "git+https://github.com/ocaml-multicore/domainslib.git"
Original file line number Diff line number Diff line change 1
- (lang dune 1 .8 )
1
+ (lang dune 3 .0 )
2
2
(name domainslib)
3
+ ( formatting disabled)
4
+ ( generate_opam_files true )
5
+
6
+ ( source ( github ocaml-multicore/domainslib) )
7
+ ( authors
" KC Sivaramakrishnan <[email protected] >" )
8
+ ( maintainers
" KC Sivaramakrishnan <[email protected] >" )
9
+ ( documentation " https://kayceesrk.github.io/domainslib/doc" )
10
+ ( license " ISC" )
11
+
12
+ ( package
13
+ (name domainslib)
14
+ (synopsis " Parallel Structures over Domains for Multicore OCaml" )
15
+ ( depends
16
+ ( ocaml ( >= " 5.0" ) )
17
+ ( lockfree ( >= " 0.2.0" ) )
18
+ ( mirage-clock-unix ( and :with -test ( >= " 4.2.0" ) ) )
19
+ ( qcheck-core ( and :with -test ( >= " 0.20" ) ) )
20
+ ( qcheck-multicoretests-util ( and :with -test ( >= " 0.1" ) ) )
21
+ ( qcheck-stm ( and :with -test ( >= " 0.1" ) ) ) ) )
Original file line number Diff line number Diff line change @@ -5,13 +5,6 @@ let mat_size = try int_of_string Sys.argv.(2) with _ -> 1200
5
5
let k = Domain.DLS. new_key Random.State. make_self_init
6
6
7
7
module SquareMatrix = struct
8
-
9
- let create f : float array =
10
- let fa = Array. create_float (mat_size * mat_size) in
11
- for i = 0 to mat_size * mat_size - 1 do
12
- fa.(i) < - f (i / mat_size) (i mod mat_size)
13
- done ;
14
- fa
15
8
let parallel_create pool f : float array =
16
9
let fa = Array. create_float (mat_size * mat_size) in
17
10
T. parallel_for pool ~start: 0 ~finish: ( mat_size * mat_size - 1 )
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ let _ =
31
31
let open Printexc in
32
32
let bt = get_raw_backtrace () in
33
33
let bt_slot_arr = Option. get (backtrace_slots bt) in
34
- assert (Option. get (Slot. name bt_slot_arr.(1 )) = " Backtrace.foo" );
34
+ let name = Option. get (Slot. name bt_slot_arr.(1 )) in
35
+ assert (name = " Backtrace.foo" || name = " Dune__exe__Backtrace.foo" );
35
36
let s = raw_backtrace_to_string bt in
36
37
print_string s
Original file line number Diff line number Diff line change @@ -19,3 +19,5 @@ let main =
19
19
let res = T. run pool (fun _ -> fib_par pool n) in
20
20
T. teardown_pool pool;
21
21
Printf. printf " fib(%d) = %d\n " n res
22
+
23
+ let () = main
You can’t perform that action at this time.
0 commit comments