added error handling into GPU perf. tests

This commit is contained in:
Alexey Spizhevoy
2011-01-25 15:11:01 +00:00
parent 6f91a29ea2
commit ab8f578f9d
3 changed files with 41 additions and 9 deletions

View File

@@ -7,6 +7,8 @@
#include <string>
#include <opencv2/core/core.hpp>
#define TAB " "
class Runnable
{
public:
@@ -31,6 +33,7 @@ public:
}
void addInit(Runnable* init) { inits_.push_back(init); }
void addTest(Runnable* test) { tests_.push_back(test); }
void run();
@@ -66,6 +69,14 @@ private:
void flush_subtest_data();
void reset_subtest_data()
{
cpu_elapsed_ = 0;
gpu_elapsed_ = 0;
description_.str("");
can_flush_ = false;
}
std::vector<Runnable*> inits_;
std::vector<Runnable*> tests_;