|
stdex
Additional custom or not Standard C++ covered algorithms
|
Aggregated progress indicator. More...
#include <stdex/progress.hpp>
Classes | |
| class | worker_progress |
| Progress indicator for individual worker. More... | |
Public Member Functions | |
| aggregate_progress (size_t num_workers, progress< T > *host=nullptr) | |
| Constructs a progress indicator. | |
| void | attach (progress< T > *host) |
| Attach to a host progress indicator. | |
| progress< T > * | detach () |
| Detach host progress indicator. | |
| progress< T > & | operator[] (size_t index) |
| Returns progress indicator for specific worker. | |
Protected Attributes | |
| progress< T > * | m_host |
| std::atomic< T > | m_start |
| std::atomic< T > | m_end |
| std::atomic< T > | m_value |
| std::vector< worker_progress > | m_workers |
| std::shared_mutex | m_mutex |
Aggregated progress indicator.
Use to report combined progress from multiple workers.
|
inline |
Constructs a progress indicator.
| [in] | num_workers | Total number of workers |
| [in] | host | Host progress indicator |
|
inline |
Attach to a host progress indicator.
| [in] | host | Host progress indicator |
|
inline |
Detach host progress indicator.
|
inline |
Returns progress indicator for specific worker.
| [in] | index | Index of worker |