I use MS Visual Studio 2010, C++,PPL library for parallel calculations and Qt library.
Concurrency::parallel_for (size_t(0), m_Engines.size(), [&](size_t i)
{
for (size_t j = 1;j <= m_Iterations;j++)
{
Compute(i);//some time-cosuming thing
}
});
Let's imagine we've got 3 independent engines with m_Iterations
for each one.
The progress bar for each engine will look like:
progress 1: ||||||||
progress 2: |||||
progress 3: |||||||||||
And I wanna have the single progressbar (instead of the shown above) which shows the backward progressbar (which shows minimal value among them):
total progress: |||||
Let us assume that we have QProgressBar * pProgressbar
, CoreApplication::processEvents()
"code snippets". How should I modify the code in order to implement the idea of a single progress bar for the inner loop using Concurrency Runtime techniques.