Answers for "c++ pthread get number of cores"

1

number of cores c++

#include <thread>

//may return 0 when not able to detect
const auto processor_count = std::thread::hardware_concurrency();
Posted by: Guest on June-07-2021

Code answers related to "c++ pthread get number of cores"

Browse Popular Code Answers by Language