Set stricter warning rules for gcc
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
#if ANDROID
|
||||
#ifdef ANDROID
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ const char *command_line_keys =
|
||||
"{ |perf_seed |809564 |seed for random numbers generator}"
|
||||
"{ |perf_tbb_nthreads |-1 |if TBB is enabled, the number of TBB threads}"
|
||||
"{ |perf_write_sanity |false |allow to create new records for sanity checks}"
|
||||
#if ANDROID
|
||||
#ifdef ANDROID
|
||||
"{ |perf_time_limit |6.0 |default time limit for a single test (in seconds)}"
|
||||
"{ |perf_affinity_mask |0 |set affinity mask for the main thread}"
|
||||
"{ |perf_log_power_checkpoints |false |additional xml logging for power measurement}"
|
||||
@@ -37,7 +37,7 @@ static uint64 param_seed;
|
||||
static double param_time_limit;
|
||||
static int param_tbb_nthreads;
|
||||
static bool param_write_sanity;
|
||||
#if ANDROID
|
||||
#ifdef ANDROID
|
||||
static int param_affinity_mask;
|
||||
static bool log_power_checkpoints;
|
||||
|
||||
@@ -57,7 +57,7 @@ static void setCurrentThreadAffinityMask(int mask)
|
||||
|
||||
#endif
|
||||
|
||||
void randu(cv::Mat& m)
|
||||
static void randu(cv::Mat& m)
|
||||
{
|
||||
const int bigValue = 0x00000FFF;
|
||||
if (m.depth() < CV_32F)
|
||||
@@ -151,7 +151,7 @@ void Regression::init(const std::string& testSuitName, const std::string& ext)
|
||||
{
|
||||
LOGE("Failed to open sanity data for reading: %s", storageInPath.c_str());
|
||||
}
|
||||
|
||||
|
||||
if(!storageIn.isOpened())
|
||||
storageOutPath = storageInPath;
|
||||
}
|
||||
@@ -534,7 +534,7 @@ void TestBase::Init(int argc, const char* const argv[])
|
||||
param_force_samples = args.get<unsigned int>("perf_force_samples");
|
||||
param_write_sanity = args.get<bool>("perf_write_sanity");
|
||||
param_tbb_nthreads = args.get<int>("perf_tbb_nthreads");
|
||||
#if ANDROID
|
||||
#ifdef ANDROID
|
||||
param_affinity_mask = args.get<int>("perf_affinity_mask");
|
||||
log_power_checkpoints = args.get<bool>("perf_log_power_checkpoints");
|
||||
#endif
|
||||
@@ -636,17 +636,17 @@ cv::Size TestBase::getSize(cv::InputArray a)
|
||||
bool TestBase::next()
|
||||
{
|
||||
bool has_next = ++currentIter < nIters && totalTime < timeLimit;
|
||||
#if ANDROID
|
||||
#ifdef ANDROID
|
||||
if (log_power_checkpoints)
|
||||
{
|
||||
timeval tim;
|
||||
gettimeofday(&tim, NULL);
|
||||
unsigned long long t1 = tim.tv_sec * 1000LLU + (unsigned long long)(tim.tv_usec / 1000.f);
|
||||
|
||||
|
||||
if (currentIter == 1) RecordProperty("test_start", cv::format("%llu",t1).c_str());
|
||||
if (!has_next) RecordProperty("test_complete", cv::format("%llu",t1).c_str());
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return has_next;
|
||||
}
|
||||
|
||||
@@ -898,7 +898,7 @@ void TestBase::SetUp()
|
||||
p_tbb_initializer=new tbb::task_scheduler_init(param_tbb_nthreads);
|
||||
}
|
||||
#endif
|
||||
#if ANDROID
|
||||
#ifdef ANDROID
|
||||
if (param_affinity_mask)
|
||||
setCurrentThreadAffinityMask(param_affinity_mask);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user