Commit 2f12e845d71d7189bfaa08a94f23b73f09685f91

Authored by Josh Klontz
1 parent 61dbdc79

finer grain concurrency for _projectPartial

Showing 1 changed file with 4 additions and 3 deletions
openbr/plugins/meta.cpp
... ... @@ -76,7 +76,7 @@ class PipeTransform : public CompositeTransform
76 76 {
77 77 Q_OBJECT
78 78  
79   - void _projectPartial(TemplateList *srcdst, int startIndex, int stopIndex)
  79 + void _projectPartial(Template *srcdst, int startIndex, int stopIndex)
80 80 {
81 81 for (int i=startIndex; i<stopIndex; i++)
82 82 *srcdst >> *transforms[i];
... ... @@ -124,8 +124,9 @@ class PipeTransform : public CompositeTransform
124 124  
125 125 fprintf(stderr, " projecting...");
126 126 QFutureSynchronizer<void> futures;
127   - for (int j=0; j < dataLines.size(); j++)
128   - futures.addFuture(QtConcurrent::run(this, &PipeTransform::_projectPartial, &dataLines[j], i, nextTrainableTransform));
  127 + for (int j=0; j<dataLines.size(); j++)
  128 + for (int k=0; k<dataLines[j].size(); k++)
  129 + futures.addFuture(QtConcurrent::run(this, &PipeTransform::_projectPartial, &dataLines[j][k], i, nextTrainableTransform));
129 130 futures.waitForFinished();
130 131  
131 132 i = nextTrainableTransform;
... ...