1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

making OCL tests conform to the comon style

This commit is contained in:
Andrey Pavlenko
2014-03-24 10:08:44 +04:00
parent 22f42a639f
commit 5421d741bc
3 changed files with 80 additions and 32 deletions
+26 -1
View File
@@ -11,4 +11,29 @@ static const char * impls[] = {
"plain"
};
CV_PERF_TEST_MAIN_WITH_IMPLS(nonfree, impls, perf::printCudaInfo())
#ifdef HAVE_OPENCL
#define DUMP_PROPERTY_XML(propertyName, propertyValue) \
do { \
std::stringstream ssName, ssValue;\
ssName << propertyName;\
ssValue << propertyValue; \
::testing::Test::RecordProperty(ssName.str(), ssValue.str()); \
} while (false)
#define DUMP_MESSAGE_STDOUT(msg) \
do { \
std::cout << msg << std::endl; \
} while (false)
#include "opencv2/ocl/private/opencl_dumpinfo.hpp"
#endif
int main(int argc, char **argv)
{
::perf::TestBase::setPerformanceStrategy(::perf::PERF_STRATEGY_SIMPLE);
#if defined(HAVE_CUDA)
CV_PERF_TEST_MAIN_INTERNALS(nonfree, impls, perf::printCudaInfo());
#else if defined(HAVE_OPENCL)
CV_PERF_TEST_MAIN_INTERNALS(nonfree, impls, dumpOpenCLDevice());
#endif
}