How to select to use OpenMP or Intel TBB?

thanks for reply, opencv did choose the parallel framework by the following order:

/* IMPORTANT: always use the same order of defines
   1. HAVE_TBB         - 3rdparty library, should be explicitly enabled
   2. HAVE_CSTRIPES    - 3rdparty library, should be explicitly enabled
   3. HAVE_OPENMP      - integrated to compiler, should be explicitly enabled
   4. HAVE_GCD         - system wide, used automatically        (APPLE only)
   5. HAVE_CONCURRENCY - part of runtime, used automatically    (Windows only - MSVS 10, MSVS 11)
*/

and i also find that we can explicit select by this api setParallelForBackend .
BTW, do you know which parallel framework is faster on windows with cpu?

1 Like