Modernes C++-Äquivalent von Python os.cpu_count()

Das C++-Äquivalent (seit C++11 von 2011) von Pythons

example.py
os.cpu_count()

ist

hardware_concurrency.cpp
#include <thread>

std::thread::hardware_concurrency()

Siehe auch die Dokumentation für std::thread::hardware_concurrency() auf cppreference.com.


Check out similar posts by category: C/C++