Skip to content

__nproc__

builtin · libnexusinterp/corefcn/nproc-proprietary.cc

: n = __nproc__ ()
: n = __nproc__ (query)

Return the number of processors as a double scalar.

query selects the count: "all" is every installed processor, "current" those usable by this process, "overridable" (the default) those usable by this process when environment limits are allowed to change the answer, and "physical" the number of physical cores (MATLAB maxNumCompThreads default; nexus#1590).