Skip to content

Commit 87e6b13

Browse files
author
Fabien Servant
committed
replace omp_set_nested with omp_set_max_active_levels
1 parent f381f4c commit 87e6b13

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/aliceVision/alicevision_omp.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inline int omp_get_thread_num() { return 0; }
1717
inline int omp_get_max_threads() { return 1; }
1818
inline void omp_set_num_threads(int num_threads) {}
1919
inline int omp_get_num_procs() { return 1; }
20-
inline void omp_set_nested(int nested) {}
20+
inline void omp_set_max_active_levels(int levels) {}
2121

2222
inline void omp_init_lock(omp_lock_t* lock) {}
2323
inline void omp_destroy_lock(omp_lock_t* lock) {}

src/aliceVision/featureEngine/FeatureExtractor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void FeatureExtractor::process(const HardwareContext& hContext, const image::EIm
147147
nbThreads = std::min(cpuJobs.size(), nbThreads);
148148

149149
ALICEVISION_LOG_INFO("# threads for extraction: " << nbThreads);
150-
omp_set_nested(1);
150+
omp_set_max_active_levels(2);
151151

152152
#pragma omp parallel for num_threads(nbThreads)
153153
for (int i = 0; i < cpuJobs.size(); ++i)

src/aliceVision/fuseCut/PointCloud.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void createVerticesWithVisibilities(const StaticVector<int>& cams,
139139
for (auto& lock : locks)
140140
omp_init_lock(&lock);
141141

142-
omp_set_nested(1);
142+
omp_set_max_active_levels(2);
143143
#pragma omp parallel for num_threads(3)
144144
for (int c = 0; c < cams.size(); ++c)
145145
{
@@ -227,7 +227,7 @@ void createVerticesWithVisibilities(const StaticVector<int>& cams,
227227
}
228228
}
229229
}
230-
omp_set_nested(0);
230+
omp_set_max_active_levels(1);
231231

232232
for (auto& lock : locks)
233233
omp_destroy_lock(&lock);
@@ -292,7 +292,7 @@ void PointCloud::fuseFromDepthMaps(const StaticVector<int>& cams, const Point3d
292292

293293
ALICEVISION_LOG_INFO("Load depth maps and add points.");
294294
{
295-
omp_set_nested(1);
295+
omp_set_max_active_levels(2);
296296
#pragma omp parallel for num_threads(3)
297297
for (int c = 0; c < cams.size(); c++)
298298
{
@@ -422,7 +422,7 @@ void PointCloud::fuseFromDepthMaps(const StaticVector<int>& cams, const Point3d
422422
}
423423
}
424424
}
425-
omp_set_nested(0);
425+
omp_set_max_active_levels(1);
426426
}
427427

428428
ALICEVISION_LOG_INFO("Filter initial 3D points by pixel size to remove duplicates.");

0 commit comments

Comments
 (0)