use num_threads instead of omp_set_num_threads

This commit is contained in:
Paul Leroy
2024-02-12 22:37:48 +01:00
parent d0d39a3c5e
commit be68cde7e3
7 changed files with 22 additions and 21 deletions
+1 -2
View File
@@ -424,8 +424,7 @@ static bool ComputeMathOpWithNearestNeighbor( const CorePoints& corePoints,
error.clear();
#ifndef _DEBUG
#if defined(_OPENMP)
omp_set_num_threads(std::max(1, omp_get_max_threads() - 2));
#pragma omp parallel for
#pragma omp parallel for num_threads(std::max(1, omp_get_max_threads() - 2))
#endif
#endif
for (int i = 0; i < static_cast<int>(pointCount); ++i)