Parallelize pyrDown & calcSharrDeriv#15799
Conversation
alalek
left a comment
There was a problem hiding this comment.
Thank you for contribution!
Please fix whitespace issues (check build status).
and consider adding hook to avoid whitespace issues in the future: https://github.com/opencv/opencv/wiki/How_to_contribute#q3-i-was-asked-to-remove-whitespace-issues-how-can-i-do-that
|
|
||
| typedef short deriv_type; | ||
|
|
||
| struct SharrDerivInvoker : ParallelLoopBody |
There was a problem hiding this comment.
Consider using Scharr() instead of separate implementation.
There was a problem hiding this comment.
This implementation is not mine - it was here, and was merely parallelized. Do you want me to use Scharr() instead?
There was a problem hiding this comment.
Looks like related changes are pretty small, so we can keep the current state.
BTW, Instead of Mat* we can use mutable Mat& in ParallelLoopBody classes (operator() is "const").
|
@alalek Also, the build failed but it seems its not my fault but of the build system. |
|
Thank you for updates! Looks good to me. May I ask you to rebase this patch onto 3.4 branch before merge. We will merge changes from 3.4 into master regularly (weekly/bi-weekly). So, please:
Note: no needs to re-open PR, apply changes "inplace". |
cdbc7af to
dde7d7a
Compare
|
@alalek Rebased onto 3.4 branch, and changed the granularity to be simply cv::getNumThreads(). Do you think we're ready to go with what we have? Thanks, |
This pullrequest changes
Parallellizes execution of cv::pyrDown and calcSharrDeriv. Both are used extensively in buildOpticalFlowPyramid and changes are aimed to speedup this function.