From 084ec93f4cb53a65008db213bbe3c101197c2d09 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 20 Nov 2015 09:34:41 -0500 Subject: [PATCH] windows compile fix --- openbr/core/boost.cpp | 9 ++++++--- openbr/core/boost.h | 6 ------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/openbr/core/boost.cpp b/openbr/core/boost.cpp index 0f4e7fc..874f974 100644 --- a/openbr/core/boost.cpp +++ b/openbr/core/boost.cpp @@ -788,14 +788,17 @@ void CascadeBoostTrainData::precalculate() { int minNum = MIN( numPrecalcVal, numPrecalcIdx); - double proctime = -TIME( 0 ); + QTime time; + time.start(); + parallel_for_( Range(numPrecalcVal, numPrecalcIdx), FeatureIdxOnlyPrecalc(featureEvaluator, buf, sample_count, is_buf_16u!=0) ); parallel_for_( Range(0, minNum), FeatureValAndIdxPrecalc(featureEvaluator, buf, &valCache, sample_count, is_buf_16u!=0) ); parallel_for_( Range(minNum, numPrecalcVal), - FeatureValOnlyPrecalc(featureEvaluator, &valCache, sample_count) ); - cout << "Precalculation time: " << (proctime + TIME( 0 )) << endl; + FeatureValOnlyPrecalc(featureEvaluator, &valCache, sample_count) ); + + cout << "Precalculation time (ms): " << time.elapsed() << endl; } //-------------------------------- CascadeBoostTree ---------------------------------------- diff --git a/openbr/core/boost.h b/openbr/core/boost.h index 7a462a6..1b54e3a 100644 --- a/openbr/core/boost.h +++ b/openbr/core/boost.h @@ -4,12 +4,6 @@ #include "ml.h" #include -#ifdef _WIN32 -#define TIME( arg ) (((double) clock()) / CLOCKS_PER_SEC) -#else -#define TIME( arg ) (time( arg )) -#endif - namespace br { -- libgit2 0.21.4