cl-cpus
2023-06-18
Get number of CPUs
Upstream URL
Author
Muyinliu Xing <muyinliu@gmail.com>
Maintainer
Catherine Tower <catherine@towernet.dev>
License
ISC
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 Lisp | Linux | Mac | FreeBSD | Windows |
---|---|---|---|---|
SBCL | Yes | Yes | Yes | Yes |
ECL | Yes | ? | Yes | ? |
CCL | Yes | Yes | Yes | Yes |
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