diff --git a/shared/mxdatagenerator/lib/include/DataGenerator.hpp b/shared/mxdatagenerator/lib/include/DataGenerator.hpp index 45acb6b2f9f6..f1971952b4bd 100644 --- a/shared/mxdatagenerator/lib/include/DataGenerator.hpp +++ b/shared/mxdatagenerator/lib/include/DataGenerator.hpp @@ -106,8 +106,7 @@ namespace DGen uint m_seed = 1713573848; std::vector m_gen; - const int m_num_threads - = (std::thread::hardware_concurrency() > 32) ? 32 : std::thread::hardware_concurrency(); + const int m_num_threads = std::min(32, omp_get_max_threads()); struct BufferDesc {