multithreading - Programmatically find the number of CPUs on a machine (CPUS, not cores) -
is there way find programmatically (c code only, linux os) number of physical cpus (not cores) ? (something similar sysconf(_sc_nprocessors_conf))
all solutions found on site explain how find number of cores. need information set threads exchange data run on same physical cpu. can information /proc/cpuinfo prefer chose second option.
Comments
Post a Comment