ygm::utility::progress_indicator

class progress_indicator

Simple progress indicator class.

ygm::progress_indicator prog(world);
for (size_t i = 0; i < 1000; ++i) {
  prog.async_inc();
  std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
prog.complete();
world.barrier();

Public Functions

inline progress_indicator(ygm::comm &comm, const options &opts)
inline ~progress_indicator()
inline void async_inc(size_t i = 1)

Asynchronously update progress from local rank.

Parameters:

i – amount to increment progress

inline void complete()

Complete the progress indicator.

This is a collective function and should be called prior to a barrier()

struct options

Public Members

size_t update_freq = 10

How frequently to attempt global reduction.

std::string message = "Progress"

Message header to print.