Ask Your Question

Revision history [back]

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:

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)deafault) - activates multithread processing
• CV_ENABLE_IPP (Off by default)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)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)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:

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 processing
• CV_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:

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 processing
• CV_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: