# stdex: stdex::aggregate_progress< T > Class Template Reference

Loading...
Searching...
No Matches
stdex::aggregate_progress< T > Class Template Reference

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

## Detailed Description

template<class T>
class stdex::aggregate_progress< T >

Aggregated progress indicator.

Use to report combined progress from multiple workers.

## Constructor & Destructor Documentation

## aggregate_progress()

template<class T >

stdex::aggregate_progress< T >::aggregate_progress | ( | size_t | num_workers,
|  | progress< T > * | host = nullptr )

inline

Constructs a progress indicator.

Parameters

  [in] | num_workers | Total number of workers
  [in] | host | Host progress indicator

## Member Function Documentation

## attach()

template<class T >

void stdex::aggregate_progress< T >::attach | ( | progress< T > * | host | ) |

inline

Attach to a host progress indicator.

Parameters

  [in] | host | Host progress indicator

## detach()

template<class T >

progress< T > * stdex::aggregate_progress< T >::detach | ( |  | ) |

inline

Detach host progress indicator.

Returns
  Old host progress indicator

## operator[]()

template<class T >

progress< T > & stdex::aggregate_progress< T >::operator[] | ( | size_t | index | ) |

inline

Returns progress indicator for specific worker.

Parameters

  [in] | index | Index of worker

Returns
  Reference to specific worker progress indicator

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

- include/stdex/progress.hpp