W3cubDocs

/Nim

Module cpuinfo

This module implements procs to determine the number of CPUs / cores.

Imports

strutils, os

Procs

proc countProcessors(): int {.gcsafe, extern: "ncpi$1",
                           raises: [OverflowError, ValueError],
                           tags: [ReadEnvEffect].}
returns the numer of the processors/cores the machine has. Returns 0 if it cannot be detected.

© 2006–2017 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/cpuinfo.html