简体   繁体   中英

Intel TBB for OpenCV pow and sqrt

In my c++ image processing algorithm, Mat.mul(), cv::pow and cv::sqrt are the most time consuming operations. Is it possible to speed up these operations using Intel TBB? Do I need to write my own matrix mul,pow and sqrt functions to enable TBB support (eg using parallel_for for iterating over mat) or is TBB support included for these functions in OpenCV? Are there any diffrent approaches for paralization of these functions?

Please refer to the question ' OpenCV TBB IPP OpenMP functions ' regarding what OpenCV parallels. It doesn't seem these functions are parallel (though they are optimized using IPP). And the reason I guess is because there is no much work per one call to these functions to justify a fork of a parallel work. At this bottom-level of the program, vectorization (SIMD, data-parallelism) is more appropriate. TBB should rather be applied from the top-level of the application first, leveraging functional or (outermost) loop parallelism (pipeline, graph, parallel_for).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM