renamed gpu namespace -> cuda
This commit is contained in:
@@ -708,18 +708,18 @@ void TestBase::Init(const std::vector<std::string> & availableImpls,
|
||||
|
||||
#ifdef HAVE_CUDA
|
||||
|
||||
param_cuda_device = std::max(0, std::min(cv::gpu::getCudaEnabledDeviceCount(), args.get<int>("perf_cuda_device")));
|
||||
param_cuda_device = std::max(0, std::min(cv::cuda::getCudaEnabledDeviceCount(), args.get<int>("perf_cuda_device")));
|
||||
|
||||
if (param_impl == "cuda")
|
||||
{
|
||||
cv::gpu::DeviceInfo info(param_cuda_device);
|
||||
cv::cuda::DeviceInfo info(param_cuda_device);
|
||||
if (!info.isCompatible())
|
||||
{
|
||||
printf("[----------]\n[ FAILURE ] \tDevice %s is NOT compatible with current GPU module build.\n[----------]\n", info.name()), fflush(stdout);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
cv::gpu::setDevice(param_cuda_device);
|
||||
cv::cuda::setDevice(param_cuda_device);
|
||||
|
||||
printf("[----------]\n[ GPU INFO ] \tRun test suite on %s GPU.\n[----------]\n", info.name()), fflush(stdout);
|
||||
}
|
||||
@@ -744,7 +744,7 @@ void TestBase::RecordRunParameters()
|
||||
#ifdef HAVE_CUDA
|
||||
if (param_impl == "cuda")
|
||||
{
|
||||
cv::gpu::DeviceInfo info(param_cuda_device);
|
||||
cv::cuda::DeviceInfo info(param_cuda_device);
|
||||
::testing::Test::RecordProperty("cv_cuda_gpu", info.name());
|
||||
}
|
||||
#endif
|
||||
@@ -1203,7 +1203,7 @@ void TestBase::RunPerfTestBody()
|
||||
metrics.terminationReason = performance_metrics::TERM_EXCEPTION;
|
||||
#ifdef HAVE_CUDA
|
||||
if (e.code == cv::Error::GpuApiCallError)
|
||||
cv::gpu::resetDevice();
|
||||
cv::cuda::resetDevice();
|
||||
#endif
|
||||
FAIL() << "Expected: PerfTestBody() doesn't throw an exception.\n Actual: it throws cv::Exception:\n " << e.what();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user