0

Related to this question, I want to compare the performance of the filter2D function to my multi-threaded version of SIMDized 2D convolution. For my implementation, AVX2, I use #omp parallel for before the for loops but the filter2D is like a black box in this implementation. One not tested solution might be using the pthreads library to perform a number of filter2D on the different part of the Mat. But, this solution is not a gentle one. What should I do to use threads in filter2D function and compare it to the multi-threaded SIMD implementation, reasonably?

Amiri
  • 2,417
  • 1
  • 15
  • 42
  • "...using the pthreads library..." - or just use [`cv::parallel_for_`](https://docs.opencv.org/3.4.1/d7/dff/tutorial_how_to_use_OpenCV_parallel_for_.html)? – Dan Mašek Apr 14 '18 at 11:27
  • Where should I put `cv::parallel_for_`? – Amiri Apr 14 '18 at 11:29
  • I meant as an alternative to having to implement all the boilerplate "to perform a number of filter2D on the different part of the `Mat` [in parallel]" using a low level API like pthreads. – Dan Mašek Apr 14 '18 at 11:47
  • I have tested but there are no threads. I have built `opencv 3.4` AVX2 enabled. – Amiri Apr 15 '18 at 15:30

0 Answers0