1 | initial version |
Hi! You can read general information about parallel_for in TBB docs. So, you shold just put your top for
loop in the operator()
of Body
class (as pointed by @Vladislav Vinogradov in answer on the same question). Something like this:
void operator ()( const cv::Range& rowRange ) const { for ( int y = rowRange.start; y < rowRange.end; y++ ) { // your loop body } } ... // calling parallel_for_ cv::parallel_for_(cv::Range(0, dst->height), body);