ddemidov/amgcl

scoped_ticker

Closed this issue · 1 comments

What is scoped_ticker designed for?
How could I use it my code? Do you have usage examples in the amgcl-library?

scoped_tic does a tic when it is constructed, and does a toc when it goes out of scope. So it measures the duration of the code block it is created in. One of the examples:

amgcl/examples/solver.cpp

Lines 591 to 594 in 42ee9da

} else {
auto t = prof.scoped_tic("assembling");
rows = sample_problem(vm["size"].as<int>(), val, col, ptr, rhs, vm["anisotropy"].as<double>());
}