reafactoring: replaced query device props functions with the DeviceInfo class

This commit is contained in:
Alexey Spizhevoy
2011-01-28 11:59:26 +00:00
parent e6d17406af
commit 575fd1fe4c
14 changed files with 127 additions and 123 deletions

View File

@@ -86,13 +86,9 @@ bool cv::gpu::StereoBM_GPU::checkIfGpuCallReasonable()
if (0 == getCudaEnabledDeviceCount())
return false;
int device = getDevice();
DeviceInfo device_info;
int minor, major;
getComputeCapability(device, major, minor);
int numSM = getNumberOfSMs(device);
if (major > 1 || numSM > 16)
if (device_info.major() > 1 || device_info.multiProcessorCount() > 16)
return true;
return false;