Merge pull request #22889 from D-Alex:patch-1

core: improve doc for setNumThreads
This commit is contained in:
Alexander Smorkalov 2023-04-07 16:37:40 +03:00 committed by GitHub
commit f5a92cb43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,11 +179,11 @@ CV_EXPORTS ErrorCallback redirectError( ErrorCallback errCallback, void* userdat
CV_EXPORTS String tempfile( const char* suffix = 0); CV_EXPORTS String tempfile( const char* suffix = 0);
CV_EXPORTS void glob(String pattern, std::vector<String>& result, bool recursive = false); CV_EXPORTS void glob(String pattern, std::vector<String>& result, bool recursive = false);
/** @brief OpenCV will try to set the number of threads for the next parallel region. /** @brief OpenCV will try to set the number of threads for subsequent parallel regions.
If threads == 0, OpenCV will disable threading optimizations and run all it's functions If threads == 1, OpenCV will disable threading optimizations and run all it's functions
sequentially. Passing threads \< 0 will reset threads number to system default. This function must sequentially. Passing threads \< 0 will reset threads number to system default.
be called outside of parallel region. The function is not thread-safe. It must not be called in parallel region or concurrent threads.
OpenCV will try to run its functions with specified threads number, but some behaviour differs from OpenCV will try to run its functions with specified threads number, but some behaviour differs from
framework: framework: