1 | initial version |
There are multiple ways to use vectorization/parallelization in OpenCV.
However, they only activate code that was written for TBB/SSE, etc. It will not parallelize generic code.
There are multiple flags to control vectorization, which you can set/unset in CMake:
CV_ENABLE_TBB
(Off by deafault)CV_ENABLE_IPP
(Off by default)CV_ENABLE_SSE
(On by default)CV_ENABLE_UNROLLED
(?? default)If enabled, TBB will start by default a number of threads equal to the number of processor cores in your PC. You can view/set the number of threads with the following functions:
2 | No.2 Revision |
There are multiple ways to use vectorization/parallelization in OpenCV.
However, they only activate code that was written for TBB/SSE, etc. It will not parallelize generic code.
There are multiple flags to control vectorization, which you can set/unset in CMake:
CV_ENABLE_TBB
(Off by CV_ENABLE_IPP
(Off by CV_ENABLE_SSE
(On by CV_ENABLE_UNROLLED
(?? If enabled, TBB will start by default a number of threads equal to the number of processor cores in your PC. You can view/set the number of threads with the following functions:
3 | No.3 Revision |
There are multiple ways to use vectorization/parallelization in OpenCV.
However, they only activate code that was written for TBB/SSE, etc. It will not parallelize generic code.
There are multiple flags to control vectorization, which you can set/unset in CMake:
CV_ENABLE_TBBWITH_TBB
(Off by deafault) - activates multithread processingCV_ENABLE_IPP
(Off by default) - activates IPP library. Because many OpenCV functions are already optimized with SSE, the gains of IPP are low now. It used to be a big boost in the old times, when OpenCV code was only C-based.CV_ENABLE_SSE
(On by default) - similar in functionaliry and results with IPP, just that it's opensource. Many building blocks in OpenCV are optimized manually with SSE.CV_ENABLE_UNROLLED
(?? default) - Experimental feature, that activates some 4- or 8- unroll loops. It theoretically helps compiler optimize the code, and improves memory access. However, the coverage of this feature in code is still very limited.If enabled, TBB will start by default a number of threads equal to the number of processor cores in your PC. You can view/set the number of threads with the following functions:
4 | No.4 Revision |
There are multiple ways to use vectorization/parallelization in OpenCV.
However, they only activate code that was written for TBB/SSE, etc. It will not parallelize generic code.
There are multiple flags to control vectorization, which you can set/unset in CMake:
WITH_TBB
(Off by deafault) - activates multithread processingCV_ENABLE_IPP
(Off by default) - activates IPP library. Because many OpenCV functions are already optimized with SSE, the gains of IPP are low now. It used to be a big boost in the old times, when OpenCV code was only C-based.CV_ENABLE_SSECV_SSE2
(On by default) - similar in functionaliry and results with IPP, just that it's opensource. Many building blocks in OpenCV are optimized manually with SSE.CV_ENABLE_UNROLLED
(?? default) - Experimental feature, that activates some 4- or 8- unroll loops. It theoretically helps compiler optimize the code, and improves memory access. However, the coverage of this feature in code is still very limited.If enabled, TBB will start by default a number of threads equal to the number of processor cores in your PC. You can view/set the number of threads with the following functions: