Contributor
Jakub Golinowski

HPX Backend for OpenCV


Mentors
Patrick Diehl, Mikael Simberg
Organization
STE||AR Group

HPX backend for parallelism in OpenCV developed in this project brings the following benefits while developing HPX-based application using OpenCV:

  1. the problem of competing backends is solved (more below).
  2. user gets greater control over the execution of OpenCV parallel algorithms (more below).
Solving competing backends problem

Without HPX backend in OpenCV, the user developing an HPX-based application using OpenCV functionality is forced to use one of the existing OpenCV parallel backends (pthreads, TBB, OMP, etc.). However, none of them is compatible with HPX and spawns own threads for parallel work execution. This is against the general HPX architecture and detrimental to the performance.

Giving greater control to the user

With the HPX backend the parallel algorithms from OpenCV will be effectively executed by the HPX parallel_for loop and therefore chunked into HPX tasks and distributed between (existing) HPX worker threads. Thanks to that user can make use of the HPX resource partitioner and choose the specific thread pool on which the OpenCV algorithm will be executed and also control the execution policy for this algorithm.

Blog post with more details