Commit 661c72239759b59c120759fcef67120cc608ce29
1 parent
8b767b4e
Using 64 bit integers to count
Showing
1 changed file
with
5 additions
and
5 deletions
openbr/plugins/classification/cascade.cpp
| ... | ... | @@ -146,9 +146,9 @@ class CascadeClassifier : public Classifier |
| 146 | 146 | return negative; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - int mine() | |
| 149 | + uint64 mine() | |
| 150 | 150 | { |
| 151 | - int passedNegatives = 0; | |
| 151 | + uint64 passedNegatives = 0; | |
| 152 | 152 | forever { |
| 153 | 153 | Mat negative; |
| 154 | 154 | Point offset; |
| ... | ... | @@ -294,13 +294,13 @@ private: |
| 294 | 294 | |
| 295 | 295 | qDebug() << "POS count : consumed " << posSamples.size() << ":" << posIndex; |
| 296 | 296 | |
| 297 | - QFutureSynchronizer<int> futures; | |
| 297 | + QFutureSynchronizer<uint64> futures; | |
| 298 | 298 | for (int i=0; i<QThread::idealThreadCount(); i++) |
| 299 | 299 | futures.addFuture(QtConcurrent::run(this, &CascadeClassifier::mine)); |
| 300 | 300 | futures.waitForFinished(); |
| 301 | 301 | |
| 302 | - int passedNegs = 0; | |
| 303 | - QList<QFuture<int> > results = futures.futures(); | |
| 302 | + uint64 passedNegs = 0; | |
| 303 | + QList<QFuture<uint64> > results = futures.futures(); | |
| 304 | 304 | for (int i=0; i<results.size(); i++) |
| 305 | 305 | passedNegs += results[i].result(); |
| 306 | 306 | ... | ... |