This commit is contained in:
jon-chuang 2023-04-30 18:14:41 +08:00
parent 496d291d67
commit 2fbc90f25e

View file

@ -64,7 +64,7 @@ int32_t get_num_physical_cores() {
#elif defined(_WIN32)
//TODO: Implement
#endif
unsigned int n_threads = std::thread::hardware_concurrency()
unsigned int n_threads = std::thread::hardware_concurrency();
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
}