multithreading - C++ 98 and threading -


i working opencv, open source image processing library, , due complexities in algorithm need use multiple threads video processing.

how multi-threading done on c++ 98? know c++ 11 has built in support library threading (std::thread) platform (msvc++ 2010) not have that. read boost library, general purpose extension c++ stl, has methods multi-threading. know msdn support (windows.h) can create , manage threads windows applications. finally, found out qt library, cross platform gui solution, has support threading.

is there naive way (not having 3rd party libraries) create cross-platform multi-threading application?

opencv relies on different external systems multithreading (or more accurately parallel processing). possible options are:

  • openmp (handled @ compiler level);
  • intel's tbb (external library);
  • libdispatch (on systems support it, macos, ios, *bsd);
  • gpgpu approaches cuda , opencl.

in recent versions of opencv these systems "hidden" behind parallel_for construct.

all applies parallel processing, i.e., data parallel tasks (roughly speaking, process each pixel or row of input in parallel). if need application level multithreading (like example having master thread , workers) need use frameworks such posix's threads or qt.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -