| 297 | } |
| 298 | |
| 299 | int 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 |
no outgoing calls