mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
fixed GPU switchable tests, changed default CC's for gpu module
This commit is contained in:
+2
-2
@@ -707,8 +707,8 @@ if(WITH_CUDA)
|
||||
set(HAVE_CUDA 1)
|
||||
message(STATUS "CUDA detected: " ${CUDA_VERSION})
|
||||
|
||||
set(CUDA_ARCH_GPU "1.1 1.2 1.3 2.0" CACHE STRING "Specify 'real' GPU architectures to build binaries for")
|
||||
set(CUDA_ARCH_PTX "1.1 1.3 2.0" CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
|
||||
set(CUDA_ARCH_GPU "1.3 2.0" CACHE STRING "Specify 'real' GPU architectures to build binaries for")
|
||||
set(CUDA_ARCH_PTX "1.1 1.3" CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
|
||||
|
||||
# Architectures to be searched for in user's input
|
||||
set (CUDA_ARCH_ALL 1.0 1.1 1.2 1.3 2.0 2.1)
|
||||
|
||||
@@ -59,10 +59,10 @@ struct CV_GpuMeanShiftTest : public CvTest
|
||||
int major, minor;
|
||||
cv::gpu::getComputeCapability(cv::gpu::getDevice(), major, minor);
|
||||
|
||||
if (major == 1)
|
||||
img_template = cv::imread(std::string(ts->get_data_path()) + "meanshift/con_result_CC1X.png");
|
||||
else
|
||||
if (cv::gpu::hasGreaterOrEqualVersion(2, 0) && major >= 2)
|
||||
img_template = cv::imread(std::string(ts->get_data_path()) + "meanshift/con_result.png");
|
||||
else
|
||||
img_template = cv::imread(std::string(ts->get_data_path()) + "meanshift/con_result_CC1X.png");
|
||||
|
||||
if (img.empty() || img_template.empty())
|
||||
{
|
||||
@@ -205,10 +205,10 @@ struct CV_GpuMeanShiftProcTest : public CvTest
|
||||
int major, minor;
|
||||
cv::gpu::getComputeCapability(cv::gpu::getDevice(), major, minor);
|
||||
|
||||
if (major == 1)
|
||||
fs.open(std::string(ts->get_data_path()) + "meanshift/spmap_CC1X.yaml", cv::FileStorage::READ);
|
||||
else
|
||||
if (cv::gpu::hasGreaterOrEqualVersion(2, 0) && major >= 2)
|
||||
fs.open(std::string(ts->get_data_path()) + "meanshift/spmap.yaml", cv::FileStorage::READ);
|
||||
else
|
||||
fs.open(std::string(ts->get_data_path()) + "meanshift/spmap_CC1X.yaml", cv::FileStorage::READ);
|
||||
fs["spmap"] >> spmap_template;
|
||||
|
||||
for (int y = 0; y < spmap.rows; ++y) {
|
||||
|
||||
@@ -71,10 +71,10 @@ struct CV_GpuMeanShiftSegmentationTest : public CvTest {
|
||||
{
|
||||
stringstream path;
|
||||
path << ts->get_data_path() << "meanshift/cones_segmented_sp10_sr10_minsize" << minsize;
|
||||
if (major == 1)
|
||||
path << "_CC1X.png";
|
||||
else
|
||||
if (cv::gpu::hasGreaterOrEqualVersion(2, 0) && major >= 2)
|
||||
path << ".png";
|
||||
else
|
||||
path << "_CC1X.png";
|
||||
|
||||
Mat dst;
|
||||
meanShiftSegmentation((GpuMat)img, dst, 10, 10, minsize);
|
||||
|
||||
Reference in New Issue
Block a user