MCPcopy Create free account
hub / github.com/colmap/colmap / GetEffectiveNumThreads

Function GetEffectiveNumThreads

src/colmap/util/threading.cc:299–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299int GetEffectiveNumThreads(const int num_threads) {
300 int num_effective_threads = num_threads;
301 if (num_threads <= 0) {
302 num_effective_threads = std::thread::hardware_concurrency();
303 }
304
305 if (num_effective_threads <= 0) {
306 num_effective_threads = 1;
307 }
308
309 return num_effective_threads;
310}
311
312} // namespace colmap

Callers 15

BindCeresSolverFunction · 0.85
SpatialPairGeneratorMethod · 0.85
RunMethod · 0.85
RunModelSplitterFunction · 0.85
RefineGravityMethod · 0.85
CalibrateFocalLengthsFunction · 0.85
SolveMethod · 0.85
CreateSolverOptionsMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68