Skip to content

Instantly share code, notes, and snippets.

@geektoni
Created May 31, 2017 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geektoni/ee4980d9ce827ad7713f16d3f6bed289 to your computer and use it in GitHub Desktop.
Save geektoni/ee4980d9ce827ad7713f16d3f6bed289 to your computer and use it in GitHub Desktop.
#include <thread>
#include <shogun/base/progress.h>
#include <shogun/io/SGIO.h>
#include <shogun/base/init.h>
using namespace shogun;
int main() {
init_shogun_with_defaults();
SGIO tmp;
tmp.enable_progress();
auto test = progress(range(0, 10), tmp);
#pragma omp parallel for
for (auto it=test.begin(); it < test.end(); it++)
{
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment