Commit 084ec93f4cb53a65008db213bbe3c101197c2d09
1 parent
8a62b8b4
windows compile fix
Showing
2 changed files
with
6 additions
and
9 deletions
openbr/core/boost.cpp
| ... | ... | @@ -788,14 +788,17 @@ void CascadeBoostTrainData::precalculate() |
| 788 | 788 | { |
| 789 | 789 | int minNum = MIN( numPrecalcVal, numPrecalcIdx); |
| 790 | 790 | |
| 791 | - double proctime = -TIME( 0 ); | |
| 791 | + QTime time; | |
| 792 | + time.start(); | |
| 793 | + | |
| 792 | 794 | parallel_for_( Range(numPrecalcVal, numPrecalcIdx), |
| 793 | 795 | FeatureIdxOnlyPrecalc(featureEvaluator, buf, sample_count, is_buf_16u!=0) ); |
| 794 | 796 | parallel_for_( Range(0, minNum), |
| 795 | 797 | FeatureValAndIdxPrecalc(featureEvaluator, buf, &valCache, sample_count, is_buf_16u!=0) ); |
| 796 | 798 | parallel_for_( Range(minNum, numPrecalcVal), |
| 797 | - FeatureValOnlyPrecalc(featureEvaluator, &valCache, sample_count) ); | |
| 798 | - cout << "Precalculation time: " << (proctime + TIME( 0 )) << endl; | |
| 799 | + FeatureValOnlyPrecalc(featureEvaluator, &valCache, sample_count) ); | |
| 800 | + | |
| 801 | + cout << "Precalculation time (ms): " << time.elapsed() << endl; | |
| 799 | 802 | } |
| 800 | 803 | |
| 801 | 804 | //-------------------------------- CascadeBoostTree ---------------------------------------- | ... | ... |
openbr/core/boost.h