Ask Your Question
2

Disable CPU parallelization

asked 2013-06-20 19:25:52 -0500

1'' gravatar image

updated 2013-06-20 21:31:22 -0500

How can I benchmark OpenCV on Windows (Visual Studio) with CPU parallelization disabled? Is this possible without rebuilding the libraries? Should I insert an #undef HAVE_PARALLEL_FRAMEWORK somewhere? I haven't noticed a CMake option to disable compilation with the Parallel Patterns Library, among other parallel frameworks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2013-06-20 23:59:02 -0500

Kirill Kornyakov gravatar image

Without recompilation you can try to use setNumThreads(0). As the result, parallel_for_ will not be executed, and only one thread will work.

edit flag offensive delete link more

Comments

Thanks very much!

1'' gravatar image1'' ( 2013-06-21 07:43:01 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-06-20 19:25:52 -0500

Seen: 1,035 times

Last updated: Jun 20 '13