Ask Your Question
3

Disable CPU parallelization

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

1'' gravatar image

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

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
5

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

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 -0600 )edit

Question Tools

Stats

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

Seen: 2,533 times

Last updated: Jun 20 '13