From 24c9f93cc81ec1fdb34f8e6530e19d178b5e6b9d Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 2 Sep 2016 12:42:16 -0600 Subject: [PATCH] disable OpenCV parallelism --- openbr/openbr_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 4fa863e..45a6cf6 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -1304,6 +1304,9 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG // We seed with 0 instead of time(NULL) to have reproducible randomness srand(0); + // Disable OpenCV parallelism, we prefer to parallelize at the image level + setNumThreads(0); + // Trigger registered initializers QList< QSharedPointer > initializers = Factory::makeAll(); foreach (const QSharedPointer &initializer, initializers) -- libgit2 0.21.4