Where is OpenMP used in OpenCV?
If OpenMP is build into the libraries is it used somewhere in the libraries? Is there a list to see which algorithms have parallel versions?
As far as I understood it, OpenCV encapsulates libraries like OpenMP and TBB (see modules/core/src/parallel.cpp), so any method which uses parallel_for_
can make use of OpenMP (note: if TBB is enabled, OpenMP won't be used). I.e. each module using parallel_for_ (https://github.com/Itseez/opencv/search?q=parallel_for&type=Code) can possibly make use of OpenMP.
The modules listed by @tuannhtn are apart from parallel.cpp actually outdated and should be revised to use parallel_for_
instead (if anybody has some time and wants to help OpenCV, this would be a nice and easy task to contribute- also parallel_for
should be converted to parallel_for_
).
Note, you can also use parallel_for_
yourself and thus use it as a wrapper for TBB/OpenMP, too.
OpenMP is NOT used in OpenCV anymore if I am not wrong. Instead, Intel TBB is used. For a list of parallelized functions scan the source code for phrase: HAVE_TBB.
For the TBB case, it is used, but not by default. But OpenMP, I'm not sure if it is not used, see this result (https://github.com/Itseez/opencv/search?l=cpp&q=OpenMP&ref=cmdform).
Here is a short guide on how to manually compile OpenCV with Intel's TBB library
Asked: 2014-05-27 03:36:58 -0600
Seen: 7,470 times
Last updated: Aug 27 '18