Skip to content

Commit

Permalink
Remove Saturn_lockfree package. (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrm authored Nov 5, 2024
1 parent 357c1fe commit 37d41e2
Show file tree
Hide file tree
Showing 76 changed files with 169 additions and 359 deletions.
4 changes: 2 additions & 2 deletions bench/bench_htbl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ let run_suite ~budgetf =
in
List.fold_right2
(fun safe unsafe acc -> safe :: unsafe :: acc)
(run ~unsafe:false (module Saturn_lockfree.Htbl))
(run ~unsafe:true (module Saturn_lockfree.Htbl_unsafe))
(run ~unsafe:false (module Saturn.Htbl))
(run ~unsafe:true (module Saturn.Htbl_unsafe))
[]
2 changes: 1 addition & 1 deletion bench/bench_queue.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Multicore_bench
module Queue = Saturn_lockfree.Queue
module Queue = Saturn.Queue

let run_one_domain ~budgetf ?(n_msgs = 50 * Util.iter_factor) () =
let t = Queue.create () in
Expand Down
2 changes: 1 addition & 1 deletion bench/bench_size.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Multicore_bench
module Size = Saturn_lockfree.Size
module Size = Saturn.Size

let run_one ~budgetf ~n_domains ?(n_ops = 250 * n_domains * Util.iter_factor) ()
=
Expand Down
4 changes: 2 additions & 2 deletions bench/bench_spsc_queue.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let run_one ~unsafe ~budgetf ?(size_exponent = 3)
let init _ = () in
let work, before =
if unsafe then
let module Queue = Saturn_lockfree.Single_prod_single_cons_queue_unsafe in
let module Queue = Saturn.Single_prod_single_cons_queue_unsafe in
let t = Queue.create ~size_exponent in

let before () =
Expand Down Expand Up @@ -41,7 +41,7 @@ let run_one ~unsafe ~budgetf ?(size_exponent = 3)
in
(work, before)
else
let module Queue = Saturn_lockfree.Single_prod_single_cons_queue in
let module Queue = Saturn.Single_prod_single_cons_queue in
let t = Queue.create ~size_exponent in

let before () =
Expand Down
2 changes: 1 addition & 1 deletion bench/bench_stack.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Multicore_bench
module Stack = Saturn_lockfree.Stack
module Stack = Saturn.Stack

let run_one_domain ~budgetf ?(n_msgs = 50 * Util.iter_factor) () =
let t = Stack.create () in
Expand Down
2 changes: 1 addition & 1 deletion bench/bench_ws_deque.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Multicore_bench
module Ws_deque = Saturn_lockfree.Work_stealing_deque
module Ws_deque = Saturn.Work_stealing_deque

let run_as_scheduler ~budgetf ?(n_domains = 1) () =
let spawns =
Expand Down
4 changes: 2 additions & 2 deletions bench/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let () =

(rule
(action
(copy ../src_lockfree/htbl/htbl_intf.mli htbl_intf.ml))
(package saturn_lockfree))
(copy ../src/htbl/htbl_intf.mli htbl_intf.ml))
(package saturn))

(test
(package saturn)
Expand Down
14 changes: 7 additions & 7 deletions bench/main.ml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
let benchmarks =
[
("Saturn_lockfree Queue", Bench_queue.run_suite);
("Saturn_lockfree Single_prod_single_cons_queue", Bench_spsc_queue.run_suite);
("Saturn_lockfree Size", Bench_size.run_suite);
("Saturn_lockfree Skiplist", Bench_skiplist.run_suite);
("Saturn_lockfree Htbl", Bench_htbl.run_suite);
("Saturn_lockfree Stack", Bench_stack.run_suite);
("Saturn_lockfree Work_stealing_deque", Bench_ws_deque.run_suite);
("Saturn Queue", Bench_queue.run_suite);
("Saturn Single_prod_single_cons_queue", Bench_spsc_queue.run_suite);
("Saturn Size", Bench_size.run_suite);
("Saturn Skiplist", Bench_skiplist.run_suite);
("Saturn Htbl", Bench_htbl.run_suite);
("Saturn Stack", Bench_stack.run_suite);
("Saturn Work_stealing_deque", Bench_ws_deque.run_suite);
]

let () = Multicore_bench.Cmd.run ~benchmarks ()
31 changes: 5 additions & 26 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,21 @@

(package
(name saturn)
(synopsis "Collection of parallelism-safe data structures for Multicore OCaml")
(synopsis "Collection of concurent-safe data structures for Multicore OCaml")
(depends
(ocaml (>= 4.14))
(backoff (>= 0.1.0))
(multicore-magic (>= 2.3.0))
(alcotest (and (>= 1.7.0) :with-test))
(domain_shims (and (>= 0.1.0) :with-test))
(saturn_lockfree (= :version))
(dscheck (and (>= 0.5.0) :with-test))
(mdx (and (>= 0.4) :with-test))
(multicore-magic (and (>= 2.3.0) :with-test))
(multicore-bench (and (>= 0.1.7) :with-test))
(multicore-magic-dscheck (and (>= 2.3.0) :with-test))
(backoff (and (>= 0.1.0) :with-test))
(alcotest (and (>= 1.7.0) :with-test))
(qcheck (and (>= 0.21.3) :with-test))
(qcheck-stm (and (>= 0.3) :with-test))
(qcheck-alcotest (and (>= 0.21.3) :with-test))
(yojson (and (>= 2.0.2) :with-test))
(dscheck (and (>= 0.5.0) :with-test))
(sherlodoc (and (>= 0.2) :with-doc))
(odoc (and (>= 2.4.1) :with-doc))))

(package
(name saturn_lockfree)
(synopsis "Collection of lock-free data structures for Multicore OCaml")
(depends
(ocaml (>= 4.14))
(domain_shims (and (>= 0.1.0) :with-test))
(backoff (>= 0.1.0))
(multicore-magic (>= 2.3.0))
(multicore-magic-dscheck (and (>= 2.3.0) :with-test))
(mdx (and (>= 0.4) :with-test))
(alcotest (and (>= 1.7.0) :with-test))
(qcheck (and (>= 0.21.3) :with-test))
(qcheck-core (and (>= 0.21.3) :with-test))
(qcheck-stm (and (>= 0.3) :with-test))
(qcheck-multicoretests-util (and (>= 0.3) :with-test))
(qcheck-alcotest (and (>= 0.21.3) :with-test))
(yojson (and (>= 2.0.2) :with-test))
(dscheck (and (>= 0.5.0) :with-test))
(sherlodoc (and (>= 0.2) :with-doc))
(odoc (and (>= 2.4.1) :with-doc))))
15 changes: 7 additions & 8 deletions saturn.opam
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis:
"Collection of parallelism-safe data structures for Multicore OCaml"
synopsis: "Collection of concurent-safe data structures for Multicore OCaml"
maintainer: ["Carine Morel" "KC Sivaramakrishnan" "Sudha Parimala"]
authors: ["KC Sivaramakrishnan"]
license: "ISC"
Expand All @@ -11,19 +10,19 @@ bug-reports: "https://github.com/ocaml-multicore/saturn/issues"
depends: [
"dune" {>= "3.14"}
"ocaml" {>= "4.14"}
"backoff" {>= "0.1.0"}
"multicore-magic" {>= "2.3.0"}
"alcotest" {>= "1.7.0" & with-test}
"domain_shims" {>= "0.1.0" & with-test}
"saturn_lockfree" {= version}
"dscheck" {>= "0.5.0" & with-test}
"mdx" {>= "0.4" & with-test}
"multicore-magic" {>= "2.3.0" & with-test}
"multicore-bench" {>= "0.1.7" & with-test}
"multicore-magic-dscheck" {>= "2.3.0" & with-test}
"backoff" {>= "0.1.0" & with-test}
"alcotest" {>= "1.7.0" & with-test}
"qcheck" {>= "0.21.3" & with-test}
"qcheck-stm" {>= "0.3" & with-test}
"qcheck-alcotest" {>= "0.21.3" & with-test}
"qcheck-core" {>= "0.21.3" & with-test}
"qcheck-stm" {>= "0.3" & with-test}
"yojson" {>= "2.0.2" & with-test}
"dscheck" {>= "0.5.0" & with-test}
"sherlodoc" {>= "0.2" & with-doc}
"odoc" {>= "2.4.1" & with-doc}
]
Expand Down
43 changes: 0 additions & 43 deletions saturn_lockfree.opam

This file was deleted.

File renamed without changes.
File renamed without changes.
12 changes: 10 additions & 2 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ let () =
Jbuild_plugin.V1.send
@@ {|

(include_subdirs unqualified)

(library
(name saturn)
(public_name saturn)
(libraries
(re_export saturn_lockfree) |}
(modules_without_implementation htbl_intf)
(libraries backoff multicore-magic |}
^ maybe_threads
^ {| ))

Expand All @@ -20,4 +22,10 @@ let () =
(< %{ocaml_version} 5.0.0))
(action
(copy domain.ocaml4.ml domain.ml)))

(rule
(enabled_if
(< %{ocaml_version} 5.2.0))
(action
(copy atomic.without_contended.ml atomic.ml)))
|}
4 changes: 2 additions & 2 deletions src_lockfree/htbl/dune → src/htbl/dune
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
(cat htbl.body.ml)))))

(mdx
(package saturn_lockfree)
(package saturn)
(enabled_if
(and
(<> %{os_type} Win32)
(>= %{ocaml_version} 5.1.0)))
(libraries saturn_lockfree)
(libraries saturn)
(files htbl_intf.mli))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src_lockfree/htbl/htbl_intf.mli → src/htbl/htbl_intf.mli
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ module type HTBL = sig
An example top-level session:
{[
# module Htbl = Saturn_lockfree.Htbl
module Htbl = Saturn_lockfree.Htbl
# module Htbl = Saturn.Htbl
module Htbl = Saturn.Htbl
# let t : (int, string) Htbl.t =
Htbl.create
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 11 additions & 15 deletions src/saturn.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ Copyright (c) 2017, Nicolas ASSOUAD <[email protected]>
########
*)

module Queue = Saturn_lockfree.Queue
module Queue_unsafe = Saturn_lockfree.Queue_unsafe
module Stack = Saturn_lockfree.Stack
module Work_stealing_deque = Saturn_lockfree.Work_stealing_deque

module Single_prod_single_cons_queue =
Saturn_lockfree.Single_prod_single_cons_queue

module Single_prod_single_cons_queue_unsafe =
Saturn_lockfree.Single_prod_single_cons_queue_unsafe

module Single_consumer_queue = Saturn_lockfree.Single_consumer_queue
module Skiplist = Saturn_lockfree.Skiplist
module Htbl = Saturn_lockfree.Htbl
module Htbl_unsafe = Saturn_lockfree.Htbl_unsafe
module Queue = Michael_scott_queue
module Queue_unsafe = Michael_scott_queue_unsafe
module Stack = Treiber_stack
module Work_stealing_deque = Ws_deque
module Single_prod_single_cons_queue = Spsc_queue
module Single_prod_single_cons_queue_unsafe = Spsc_queue_unsafe
module Single_consumer_queue = Mpsc_queue
module Size = Size
module Skiplist = Skiplist
module Htbl = Htbl
module Htbl_unsafe = Htbl_unsafe
28 changes: 12 additions & 16 deletions src/saturn.mli
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,18 @@ Copyright (c) 2017, Nicolas ASSOUAD <[email protected]>
########
*)

(** Domain-safe data structures for Multicore OCaml *)
(** Lock-free data structures for Multicore OCaml *)

(** {1 Data structures} *)

module Queue = Saturn_lockfree.Queue
module Queue_unsafe = Saturn_lockfree.Queue_unsafe
module Stack = Saturn_lockfree.Stack
module Work_stealing_deque = Saturn_lockfree.Work_stealing_deque

module Single_prod_single_cons_queue =
Saturn_lockfree.Single_prod_single_cons_queue

module Single_prod_single_cons_queue_unsafe =
Saturn_lockfree.Single_prod_single_cons_queue_unsafe

module Single_consumer_queue = Saturn_lockfree.Single_consumer_queue
module Skiplist = Saturn_lockfree.Skiplist
module Htbl = Saturn_lockfree.Htbl
module Htbl_unsafe = Saturn_lockfree.Htbl_unsafe
module Queue = Michael_scott_queue
module Queue_unsafe = Michael_scott_queue_unsafe
module Stack = Treiber_stack
module Work_stealing_deque = Ws_deque
module Single_prod_single_cons_queue = Spsc_queue
module Single_prod_single_cons_queue_unsafe = Spsc_queue_unsafe
module Single_consumer_queue = Mpsc_queue
module Skiplist = Skiplist
module Size = Size
module Htbl = Htbl
module Htbl_unsafe = Htbl_unsafe
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src_lockfree/domain.ocaml4.ml

This file was deleted.

32 changes: 0 additions & 32 deletions src_lockfree/dune

This file was deleted.

Loading

0 comments on commit 37d41e2

Please sign in to comment.