Commit 24c9f93cc81ec1fdb34f8e6530e19d178b5e6b9d
1 parent
82595a2a
disable OpenCV parallelism
Showing
1 changed file
with
3 additions
and
0 deletions
openbr/openbr_plugin.cpp
| ... | ... | @@ -1304,6 +1304,9 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG |
| 1304 | 1304 | // We seed with 0 instead of time(NULL) to have reproducible randomness |
| 1305 | 1305 | srand(0); |
| 1306 | 1306 | |
| 1307 | + // Disable OpenCV parallelism, we prefer to parallelize at the image level | |
| 1308 | + setNumThreads(0); | |
| 1309 | + | |
| 1307 | 1310 | // Trigger registered initializers |
| 1308 | 1311 | QList< QSharedPointer<Initializer> > initializers = Factory<Initializer>::makeAll(); |
| 1309 | 1312 | foreach (const QSharedPointer<Initializer> &initializer, initializers) | ... | ... |