aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
ThreadExecutor Class Reference

The class enables to uses openMP to execute callables in parallel. More...

#include <agrum/base/core/threads/threadExecutorOMP.h>

Detailed Description

The class enables to uses openMP to execute callables in parallel.

The threadsOMP::ThreadExecutor class is intended to easily parallelize algorithms by providing a simple interface to launch the threads. The class also catches exceptions raised by the threads, so that those do not terminate prematurely the program. It can then rethrow one such exception in a single-threaded manner, so that it can be caught by the main thread.

Warning
This class is not intended to be used explicitly by the user. It is preferable to use class threads::ThreadExecutor, which will point to the threadsOMP::ThreadExecutor class if the threads infrastructure to use is openMP.
Usage example:

The documentation for this class was generated from the following file: