Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shogun's Progress Bar
1) Base features:
- UTF-8/ASCII progress bar mode switch (prevents Windows madness);
- Display current SG_PROGRESS information (maybe others like iterations/second);
- Three range types:
-> prange(0, 100): range with bound;
-> prange(100): range with upper bound;
-> prange(it.begin(), it.end()): range using an iterators (range over a custom set of values);
-> prange_mt(100): range multi-threaded;
2) Possible other features:
- Add a "pretty" print mode;
- Specify the char used for the progress bar;
- Resizable progress bar (since only \n and \r will be used the user can blow things up by changing the terminal size);
3) Example (future) usage:
for (auto i : prange(0, 100)) {
/* Do stuff */
}
for (auto i : prange(0, 100, "pretty")) {
/* Do fancier stuff */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.