detectCores {Parallel} | R Documentation |
Attempt to detect the number of CPU cores on the current host.
detectCores();
This attempts to detect the number of available CPU cores. It has methods To Do so For Linux, macOS, FreeBSD, OpenBSD, Solaris, Irix And Windows. detectCores(True) could be tried On other Unix-alike systems.
An integer, NA if the answer is unknown. Exactly what this represents Is OS-dependent: where possible by Default it counts logical (e.g., hyperthreaded) CPUs And Not physical cores Or packages.