Commit 4716f634 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed gpu performance tests:

used new CV_PERF_TEST_MAIN_WITH_IMPLS mechanism
parent 3443fd85
...@@ -44,11 +44,4 @@ ...@@ -44,11 +44,4 @@
using namespace perf; using namespace perf;
static const char * impls[] = { CV_PERF_TEST_CUDA_MAIN(gpu)
#ifdef HAVE_CUDA
"cuda",
#endif
"plain"
};
CV_PERF_TEST_MAIN_WITH_IMPLS(gpu, impls, printCudaInfo())
...@@ -52,16 +52,7 @@ ...@@ -52,16 +52,7 @@
#include "opencv2/ts.hpp" #include "opencv2/ts.hpp"
#include "opencv2/ts/gpu_perf.hpp" #include "opencv2/ts/gpu_perf.hpp"
int main(int argc, char* argv[]) CV_PERF_TEST_CUDA_MAIN(gpu_perf4au)
{
perf::printCudaInfo();
perf::Regression::Init("gpu_perf4au");
perf::TestBase::Init(argc, argv);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// HoughLinesP // HoughLinesP
......
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpuarithm, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpuarithm)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpubgsegm, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpubgsegm)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpucodec, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpucodec)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpufeatures2d, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpufeatures2d)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpufilters, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpufilters)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpuimgproc, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpuimgproc)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpuoptflow, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpuoptflow)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpustereo, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpustereo)
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
using namespace perf; using namespace perf;
CV_PERF_TEST_MAIN(gpuwarping, printCudaInfo()) CV_PERF_TEST_CUDA_MAIN(gpuwarping)
#include "perf_precomp.hpp" #include "perf_precomp.hpp"
#include "opencv2/ts/gpu_perf.hpp"
CV_PERF_TEST_MAIN(photo) static const char * impls[] = {
#ifdef HAVE_CUDA
"cuda",
#endif
"plain"
};
CV_PERF_TEST_MAIN_WITH_IMPLS(photo, impls, perf::printCudaInfo())
...@@ -41,5 +41,13 @@ ...@@ -41,5 +41,13 @@
//M*/ //M*/
#include "perf_precomp.hpp" #include "perf_precomp.hpp"
#include "opencv2/ts/gpu_perf.hpp"
CV_PERF_TEST_MAIN(softcascade) static const char * impls[] = {
#ifdef HAVE_CUDA
"cuda",
#endif
"plain"
};
CV_PERF_TEST_MAIN_WITH_IMPLS(softcascade, impls, perf::printCudaInfo())
...@@ -105,6 +105,22 @@ namespace perf ...@@ -105,6 +105,22 @@ namespace perf
CV_EXPORTS void printCudaInfo(); CV_EXPORTS void printCudaInfo();
CV_EXPORTS void sortKeyPoints(std::vector<cv::KeyPoint>& keypoints, cv::InputOutputArray _descriptors = cv::noArray()); CV_EXPORTS void sortKeyPoints(std::vector<cv::KeyPoint>& keypoints, cv::InputOutputArray _descriptors = cv::noArray());
#ifdef HAVE_CUDA
#define CV_PERF_TEST_CUDA_MAIN(modulename) \
int main(int argc, char **argv)\
{\
const char * impls[] = { "cuda", "plain" };\
CV_PERF_TEST_MAIN_INTERNALS(modulename, impls, perf::printCudaInfo())\
}
#else
#define CV_PERF_TEST_CUDA_MAIN(modulename) \
int main(int argc, char **argv)\
{\
const char * plain_only[] = { "plain" };\
CV_PERF_TEST_MAIN_INTERNALS(modulename, plain_only)\
}
#endif
} }
#endif // __OPENCV_GPU_PERF_UTILITY_HPP__ #endif // __OPENCV_GPU_PERF_UTILITY_HPP__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment