print information message about target device for GPU module tests
This commit is contained in:
parent
715a0032e0
commit
f88be98ec4
@ -4,8 +4,6 @@ using namespace std;
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace cv::gpu;
|
using namespace cv::gpu;
|
||||||
|
|
||||||
bool runOnGpu = true;
|
|
||||||
|
|
||||||
void fillRandom(Mat& m, double a, double b)
|
void fillRandom(Mat& m, double a, double b)
|
||||||
{
|
{
|
||||||
RNG rng(123456789);
|
RNG rng(123456789);
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc/imgproc.hpp"
|
||||||
#include "opencv2/ts/ts_perf.hpp"
|
#include "opencv2/ts/ts_perf.hpp"
|
||||||
|
|
||||||
extern bool runOnGpu;
|
|
||||||
|
|
||||||
void fillRandom(cv::Mat& m, double a = 0.0, double b = 255.0);
|
void fillRandom(cv::Mat& m, double a = 0.0, double b = 255.0);
|
||||||
cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
|
cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
|
||||||
|
|
||||||
|
@ -618,6 +618,11 @@ void TestBase::Init(int argc, const char* const argv[])
|
|||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#ifdef HAVE_CUDA
|
||||||
param_run_cpu = args.has("perf_run_cpu");
|
param_run_cpu = args.has("perf_run_cpu");
|
||||||
|
|
||||||
|
if (param_run_cpu)
|
||||||
|
printf("[----------]\n[ GPU INFO ] \tRun test suite on CPU.\n[----------]\n"), fflush(stdout);
|
||||||
|
else
|
||||||
|
printf("[----------]\n[ GPU INFO ] \tRun test suite on GPU.\n[----------]\n"), fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!args.check())
|
if (!args.check())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user