Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts: doc/tutorials/definitions/noContent.rst doc/tutorials/gpu/gpu-basics-similarity/gpu-basics-similarity.rst doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst doc/tutorials/introduction/how_to_write_a_tutorial/how_to_write_a_tutorial.rst modules/core/include/opencv2/core/core.hpp modules/core/include/opencv2/core/internal.hpp modules/core/include/opencv2/core/version.hpp modules/gpu/CMakeLists.txt modules/highgui/perf/perf_output.cpp modules/highgui/test/test_video_io.cpp modules/ocl/include/opencv2/ocl/ocl.hpp modules/ocl/perf/main.cpp modules/ocl/src/hog.cpp modules/ocl/src/initialization.cpp modules/ocl/src/moments.cpp modules/ocl/src/opencl/moments.cl modules/ocl/test/main.cpp modules/ocl/test/test_moments.cpp modules/python/test/test.py modules/ts/include/opencv2/ts/ts_perf.hpp modules/ts/src/precomp.hpp modules/ts/src/ts_perf.cpp
This commit is contained in:
@@ -17566,6 +17566,9 @@ GTEST_DECLARE_string_(color);
|
||||
// the tests to run. If the filter is not given all tests are executed.
|
||||
GTEST_DECLARE_string_(filter);
|
||||
|
||||
// OpenCV extension: same as filter, but for the parameters string.
|
||||
GTEST_DECLARE_string_(param_filter);
|
||||
|
||||
// This flag causes the Google Test to list tests. None of the tests listed
|
||||
// are actually run if the flag is provided.
|
||||
GTEST_DECLARE_bool_(list_tests);
|
||||
|
@@ -218,8 +218,7 @@ public:
|
||||
static bool targetDevice();
|
||||
};
|
||||
|
||||
# define PERF_RUN_GPU() ::perf::GpuPerf::targetDevice()
|
||||
|
||||
#define PERF_RUN_GPU() ::perf::GpuPerf::targetDevice()
|
||||
|
||||
/*****************************************************************************************\
|
||||
* Container for performance metrics *
|
||||
@@ -261,7 +260,11 @@ public:
|
||||
TestBase();
|
||||
|
||||
static void Init(int argc, const char* const argv[]);
|
||||
static void Init(const std::vector<std::string> & availableImpls,
|
||||
int argc, const char* const argv[]);
|
||||
static void RecordRunParameters();
|
||||
static std::string getDataPath(const std::string& relativePath);
|
||||
static std::string getSelectedImpl();
|
||||
|
||||
protected:
|
||||
virtual void PerfTestBody() = 0;
|
||||
@@ -475,15 +478,29 @@ CV_EXPORTS void PrintTo(const Size& sz, ::std::ostream* os);
|
||||
void fixture##_##name::PerfTestBody()
|
||||
|
||||
|
||||
#define CV_PERF_TEST_MAIN(testsuitname, ...) \
|
||||
int main(int argc, char **argv)\
|
||||
{\
|
||||
#define CV_PERF_TEST_MAIN_INTERNALS(modulename, impls, ...) \
|
||||
while (++argc >= (--argc,-1)) {__VA_ARGS__; break;} /*this ugly construction is needed for VS 2005*/\
|
||||
::perf::Regression::Init(#testsuitname);\
|
||||
::perf::TestBase::Init(argc, argv);\
|
||||
::perf::Regression::Init(#modulename);\
|
||||
::perf::TestBase::Init(std::vector<std::string>(impls, impls + sizeof impls / sizeof *impls),\
|
||||
argc, argv);\
|
||||
::testing::InitGoogleTest(&argc, argv);\
|
||||
cvtest::printVersionInfo();\
|
||||
return RUN_ALL_TESTS();\
|
||||
::testing::Test::RecordProperty("cv_module_name", #modulename);\
|
||||
::perf::TestBase::RecordRunParameters();\
|
||||
return RUN_ALL_TESTS();
|
||||
|
||||
// impls must be an array, not a pointer; "plain" should always be one of the implementations
|
||||
#define CV_PERF_TEST_MAIN_WITH_IMPLS(modulename, impls, ...) \
|
||||
int main(int argc, char **argv)\
|
||||
{\
|
||||
CV_PERF_TEST_MAIN_INTERNALS(modulename, impls, __VA_ARGS__)\
|
||||
}
|
||||
|
||||
#define CV_PERF_TEST_MAIN(modulename, ...) \
|
||||
int main(int argc, char **argv)\
|
||||
{\
|
||||
const char * plain_only[] = { "plain" };\
|
||||
CV_PERF_TEST_MAIN_INTERNALS(modulename, plain_only, __VA_ARGS__)\
|
||||
}
|
||||
|
||||
#define TEST_CYCLE_N(n) for(declare.iterations(n); startTimer(), next(); stopTimer())
|
||||
|
Reference in New Issue
Block a user