Tomographer  v5.3
Tomographer C++ Framework Documentation
Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType > Struct Template Reference

A complete status report, abstract version. More...

#include <tomographer/multiproc.h>

+ Collaboration diagram for Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >:

Public Member Functions

double totalFractionDone () const
 The total fraction of the job completed. More...
 
std::string getHumanReport () const
 Produce a text-based human-readable short representation of the status report. More...
 

Public Attributes

TaskCountIntType num_completed
 Number of completed tasks.
 
TaskCountIntType num_total_runs
 Total number of tasks to perform.
 
std::vector< bool > workers_running
 List specifying for each worker (e.g. a spawned thread) whether it is active or not. More...
 
std::vector< TaskStatusReportType, typename Tools::NeedOwnOperatorNew< TaskStatusReportType >::AllocatorType > workers_reports
 List with the raw report submitted from each individual thread. More...
 
double elapsed
 Number of seconds elapsed since launching the tasks. More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename TaskStatusReportType, typename TaskCountIntType>
struct Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >

A complete status report, abstract version.

Note: TaskStatusReportType must be default-constructible and copy-constructible.

Definition at line 97 of file multiproc.h.

Member Function Documentation

§ getHumanReport()

template<typename TaskStatusReportType, typename TaskCountIntType>
std::string Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >::getHumanReport ( ) const
inline

Produce a text-based human-readable short representation of the status report.

Definition at line 166 of file multiproc.h.

§ totalFractionDone()

template<typename TaskStatusReportType, typename TaskCountIntType>
double Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >::totalFractionDone ( ) const
inline

The total fraction of the job completed.

Returns the total fraction of the tasks completed, taking into account the number of tasks fully completed and any partially completed tasks.

This is the figure you want to report in a global progress bar, for example.

Definition at line 149 of file multiproc.h.

Member Data Documentation

§ elapsed

template<typename TaskStatusReportType, typename TaskCountIntType>
double Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >::elapsed

Number of seconds elapsed since launching the tasks.

Definition at line 139 of file multiproc.h.

§ workers_reports

template<typename TaskStatusReportType, typename TaskCountIntType>
std::vector<TaskStatusReportType, typename Tools::NeedOwnOperatorNew<TaskStatusReportType>::AllocatorType> Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >::workers_reports

List with the raw report submitted from each individual thread.

The length of this list is always the same as that of workers_running.

If worker number k (e.g. the k-th thread) is active and currently running a task, then workers_reports[k] is the raw status report that was submitted by that thread. If the thread is not running a task, tasks_reports[k] is an invalid, or default-constructed value.

Definition at line 134 of file multiproc.h.

§ workers_running

template<typename TaskStatusReportType, typename TaskCountIntType>
std::vector<bool> Tomographer::MultiProc::FullStatusReport< TaskStatusReportType, TaskCountIntType >::workers_running

List specifying for each worker (e.g. a spawned thread) whether it is active or not.

If workers_running[k] is true, then the worker number k (e.g. the k -th thread) is currently running a task. Otherwise, it is inactive, for example an idle thread waiting (because of chunking of tasks, for example, or because there are are no new tasks to start)

Definition at line 122 of file multiproc.h.


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