Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaustin123 committed May 13, 2020
1 parent 4884112 commit 057d44a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/autoppl/util/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ namespace ppl {

namespace util {

/*
* ProgressLogger prints a visual progress bar counting towards 100% completion
* of an algorithm or task (really, any for loop). max is the value being counted
* towards, e.g. the upper-bound of the for-loop, and name is a string to print
* alongside the progress bar. This prints directly to stdout, and no print statements
* should be made in the intervening period between calls to printProgress.
*/
struct ProgressLogger {
ProgressLogger(size_t max, const std::string & name) : _max(max), _name(name) {};

Expand All @@ -18,8 +25,8 @@ struct ProgressLogger {
}

private:
size_t _max;
std::string _name;
size_t _max; // maximum vaue to count progress towards
std::string _name; // name of the algorithm being measured, printed with progress bar
};


Expand Down

0 comments on commit 057d44a

Please sign in to comment.