cl-cpus

2023-06-18

Get number of CPUs

Upstream URL

git.towernet.dev/projects/cl-cpus

Author

Muyinliu Xing <muyinliu@gmail.com>

Maintainer

Catherine Tower <catherine@towernet.dev>

License

ISC
README

cl-cpus

cl-cpus is a Common Lisp library to get the number of logical CPUs installed on a system.

License

Copyright (c) 2017 Muyinliu Xing Released under the ISC License.

Note: the Linux part of code comes from Edmund Weitz's book Common Lisp Recipes.

Compatibility

Common LispLinuxMacFreeBSDWindows
SBCLYesYesYesYes
ECLYes?Yes?
CCLYesYesYesYes

Install with Git and ASDF

In shell:

git clone git://git.towernet.dev/cl-cpus.git

Make sure to add the cl-cpus directory to your ASDF source-registry! In ~/.common-lisp/source-registry.conf/40-cl-cpus.conf:

(:directory "/path/to/cl-cpus")

Then load with ASDF:

(asdf:load-system :cl-cpus")

Usage

(cpus:get-number-of-processors)

will get number of CPUs:

=> 8

Issues

If you find an issue, please send an email to catherine@towernet.dev

Dependencies (1)

  • cffi

Dependents (3)

  • GitHub
  • Quicklisp