diff --git a/app/br/br.cpp b/app/br/br.cpp index 8b3d9f4..c59ddb8 100644 --- a/app/br/br.cpp +++ b/app/br/br.cpp @@ -231,14 +231,12 @@ int main(int argc, char *argv[]) br_initialize(argc, argv); // Do argument execution in another thread so this main thread can run an event loop. - // When adding fakeMain to the global thread pool we give it low priority + // When adding fakeMain to the global thread pool we give it a higher (slower) priority // so that it is preempted when parallel work is available, // otherwise we would only achieve (n-1)/n CPU utilization. FakeMain *fakeMain = new FakeMain(argc, argv); - QThreadPool::globalInstance()->start(fakeMain, -1); + QThreadPool::globalInstance()->start(fakeMain, 1); QCoreApplication::exec(); br_finalize(); } - -#include "br.moc" diff --git a/sdk/plugins/meta.cpp b/sdk/plugins/meta.cpp index dd11ca5..5962aa0 100644 --- a/sdk/plugins/meta.cpp +++ b/sdk/plugins/meta.cpp @@ -61,31 +61,6 @@ static void _train(Transform *transform, const TemplateList *data) transform->train(*data); } -// For handling progress feedback -static int depth = 0; - -static void acquireStep() -{ - if (depth == 0) { - Globals->currentStep = 0; - Globals->totalSteps = 1; - } - depth++; -} - -static void releaseStep() -{ - depth--; - Globals->currentStep = floor(Globals->currentStep * pow(10.0, double(depth))) / pow(10.0, double(depth)); - if (depth == 0) - Globals->totalSteps = 0; -} - -static void incrementStep() -{ - Globals->currentStep += 1.0 / pow(10.0, double(depth)); -} - /*! * \ingroup Transforms * \brief Transforms in series. @@ -102,16 +77,13 @@ class PipeTransform : public CompositeTransform void train(const TemplateList &data) { - acquireStep(); - TemplateList copy(data); for (int i=0; iobjectName())); transforms[i]->train(copy); + fprintf(stderr, "projecting...\n"); copy >> *transforms[i]; - incrementStep(); } - - releaseStep(); } void backProject(const Template &dst, Template &src) const