Skip to content

Sudha247/domainslib

 
 

Repository files navigation

domainslib - Domain-level Parallel Programming Library for Multicore OCaml

domainslib provides control and data structure for parallel programming using domains.

The supported data structures are:

  • Channels
    • Channels may be shared between multiple senders and receivers.
    • Channels come in two flavours -- bounded (fixed-buffer size (>= 0) beyond which the send blocks) and unbounded.
  • Task
    • Work-stealing task pool with async/await parallelism and parallel for loop.

See examples for usage.

Installation

The library can be installed using multicore-opam, an OPAM repository of multicore specific packages.

$ opam update
$ opam switch create 4.10.0+multicore --packages=ocaml-variants.4.10.0+multicore,ocaml-secondary-compiler --repositories=multicore=git+https://github.com/ocamllabs/multicore-opam.git,default
$ opam switch 4.10.0+multicore
$ opam install dune domainslib

Development

If you are interested in hacking on the implementation, then opam pin this repository:

First install the multicore compiler and dune:

$ opam update
$ opam switch create 4.10.0+multicore --packages=ocaml-variants.4.10.0+multicore,ocaml-secondary-compiler --repositories=multicore=git+https://github.com/ocamllabs/multicore-opam.git,default
$ opam switch 4.10.0+multicore
$ opam install dune

Then, pin a clone of this repo:

$ git clone https://github.com/ocaml-multicore/domainslib
$ cd domainslib
$ opam pin add domainslib file:https://`pwd`

About

Parallel Programming over Domains

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 78.6%
  • Shell 20.1%
  • Makefile 1.3%