Tomographer  v4.0
Tomographer C++ Framework Documentation
Multiprocessing Task Interfaces

The following describes ‘type interfaces.’ See Type Interfaces for more info on what that is.

The following are type interfaces that allow the creation of several instances of a task, possibly reporting intermediate status, and collecting results in the end.

Such interfaces are required, for example, to run parallel tasks with the OMP task dispatcher, Tomographer::MultiProc::OMP::TaskDispatcher, which is itself a TaskDispatcher Interface compliant type.

In the future, I hope we can also write an MPI implementation using the same interfaces. (Hopefully everything works fine if ResultType and TaskCData is serializable)

A task is implemented by a Task Interface. It may refer to some global, constant data (the parameters of the problem) stored in a struct (referred to as TaskCData in the following docs). Each Task generates a result, which is sent to and collected by a type responsible for aggregating the data in a usable form (e.g., calculating an average and std. deviation), which compiles with the ResultsCollector Interface. The task manager exposes an API to interact with the Task objects: it is the TaskManagerIface Interface. This interface may be used for example in order to submit intermediate status reports.

Type interfaces which are used by the task dispatcher:

The type interface which the task dispatcher itself obeys: