mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
renamed gpu namespace -> cuda
This commit is contained in:
@@ -278,13 +278,13 @@ namespace perf
|
||||
printf("[----------]\n"), fflush(stdout);
|
||||
|
||||
printf("[----------]\n"), fflush(stdout);
|
||||
int deviceCount = cv::gpu::getCudaEnabledDeviceCount();
|
||||
int deviceCount = cv::cuda::getCudaEnabledDeviceCount();
|
||||
printf("[ GPU INFO ] \tCUDA device count:: %d.\n", deviceCount), fflush(stdout);
|
||||
printf("[----------]\n"), fflush(stdout);
|
||||
|
||||
for (int i = 0; i < deviceCount; ++i)
|
||||
{
|
||||
cv::gpu::DeviceInfo info(i);
|
||||
cv::cuda::DeviceInfo info(i);
|
||||
|
||||
printf("[----------]\n"), fflush(stdout);
|
||||
printf("[ DEVICE ] \t# %d %s.\n", i, info.name()), fflush(stdout);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::gpu;
|
||||
using namespace cv::cuda;
|
||||
using namespace cvtest;
|
||||
using namespace testing;
|
||||
using namespace testing::internal;
|
||||
@@ -515,7 +515,7 @@ namespace cvtest
|
||||
}
|
||||
|
||||
|
||||
void cv::gpu::PrintTo(const DeviceInfo& info, std::ostream* os)
|
||||
void cv::cuda::PrintTo(const DeviceInfo& info, std::ostream* os)
|
||||
{
|
||||
(*os) << info.name();
|
||||
}
|
||||
|
||||
@@ -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