Skip to content

Commit 862242a

Browse files
committed
stitching(perf): check for available OpenCL memory
1 parent 6ba22de commit 862242a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/stitching/perf/opencl/perf_stitch.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ OCL_PERF_TEST_P(stitch, b12, TEST_DETECTORS)
101101

102102
OCL_PERF_TEST_P(stitch, boat, TEST_DETECTORS)
103103
{
104+
Size expected_dst_size(10789, 2663);
105+
checkDeviceMaxMemoryAllocSize(expected_dst_size, CV_16SC3, 4);
106+
104107
UMat pano;
105108

106109
vector<Mat> _imgs;
@@ -132,8 +135,8 @@ OCL_PERF_TEST_P(stitch, boat, TEST_DETECTORS)
132135
stopTimer();
133136
}
134137

135-
EXPECT_NEAR(pano.size().width, 10789, 200);
136-
EXPECT_NEAR(pano.size().height, 2663, 100);
138+
EXPECT_NEAR(pano.size().width, expected_dst_size.width, 200);
139+
EXPECT_NEAR(pano.size().height, expected_dst_size.height, 100);
137140

138141
SANITY_CHECK_NOTHING();
139142
}

0 commit comments

Comments
 (0)