简体   繁体   English

面向OpenCV战俘和sqrt的英特尔TBB

[英]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. 在我的c ++图像处理算法中,Mat.mul(),cv :: pow和cv :: sqrt是最耗时的操作。 Is it possible to speed up these operations using Intel TBB? 是否可以使用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? 我是否需要编写自己的矩阵mul,pow和sqrt函数来启用TBB支持(例如,使用parallel_for遍历mat),还是OpenCV中包括了这些功能的TBB支持? Are there any diffrent approaches for paralization of these functions? 是否有用于使这些功能瘫痪的不同方法?

Please refer to the question ' OpenCV TBB IPP OpenMP functions ' regarding what OpenCV parallels. 有关什么与OpenCV并行,请参考问题“ OpenCV TBB IPP OpenMP功能 ”。 It doesn't seem these functions are parallel (though they are optimized using IPP). 这些功能似乎不是并行的(尽管它们使用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. 在程序的最底层,向量化(SIMD,数据并行性)更合适。 TBB should rather be applied from the top-level of the application first, leveraging functional or (outermost) loop parallelism (pipeline, graph, parallel_for). 相反,应首先从应用程序的顶层应用TBB,利用功能或(最外部)循环并行性(管道,图形,parallel_for)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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