linux get Cpu Count?
You can read /proc/cpuinfo. This will have one entry for each core. If the processor has Hyper Threading you will see two for each core. Although I think the file has values that could be used to determine actual physical processors.
boost also has boost::thread::get_hardware_concurrency() or boost::thread::hardware_concurrency() or something like that
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement