Ask Your Question
3

parallelization with openmp or tbb

asked 2014-01-17 04:00:11 -0600

drKzs gravatar image

Hello,

I was wondering if there was a more preconized parallel library to use with opencv (I mean to use the parallelized code of the library) ?

I tried tbb and it works fine, I was just wondering if it would be even better with openmp ?

I realize it would be more a question like "openmp vs tbb performance", but just to know if some people have experienced some differences ?

And question related, is there a documentation where I can see which feature of opencv is parallelized, or should I look the code ? Because I am parallelizing my app, and I wouldn't want to overload the cpus by using an opencv-parallelized-method in my own parallelized loop (Well it would use the available cpu resources, but I want to let some cores available for other processes) :)

But maybe the question I should answer is "is it more efficient to use parallelized library and at same time parallelize your code" ... maybe it's better to choose one way or other, not to mix ? What do you think ?

Thanx :)

edit retag flag offensive close merge delete

Comments

yes, I could toggle parallelization on/off where it suits me better, if I decide which way is the best :) now i have to check where are the "too much parallelized" moment ...

drKzs gravatar imagedrKzs ( 2014-01-21 11:18:39 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-01-17 11:57:29 -0600

Vladislav Vinogradov gravatar image

OpenCV provides cv::setNumThreads function to control the parallelization. If you call setNumThreads(0), all OpenCV functions will not use any parallel framework.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-17 04:00:11 -0600

Seen: 2,235 times

Last updated: Jan 17 '14