package corecount

  1. Overview
  2. Docs
Get count of cores on machine

Install

Dune Dependency

Authors

Maintainers

Sources

v1.0.0.tar.gz
sha256=f35df6a084fefd3ea8667bb0754d7b0e5814981b2cba5a5c44b9c2102c5d34ac
md5=e73e83bfaa0fc9f2434ebbd8cad590b6

doc/src/corecount/corecount.ml.html

Source file corecount.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
(** Get a count of cores on the current machine, simple exposure of
    http://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency *)

(** Raised when the value is not well defined or not computable*)
exception Count_not_defined

let () =
  Callback.register_exception
    "count_not_defined_exn"
    Count_not_defined

(** Returns the number of cores on the current machine*)
external count : unit -> Nativeint.t = "core_count_ml"
OCaml

Innovation. Community. Security.