Skip to content

Commit 97ccf94

Browse files
committed
Refactor performance test to eliminate unnecessary output parameter initialization
1 parent c451a64 commit 97ccf94

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

modules/cudawarping/perf/perf_warping.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,23 +207,14 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, ResizeLanczos,
207207
{
208208
const cv::cuda::GpuMat d_src(src);
209209
cv::cuda::GpuMat dst;
210-
cv::Size dsize(cv::saturate_cast<int>(src.cols * f), cv::saturate_cast<int>(src.rows * f));
211-
cv::Mat host_dst(dsize, type);
212-
213-
declare.out(host_dst);
214210

215211
TEST_CYCLE() cv::cuda::resize(d_src, dst, cv::Size(), f, f, interpolation);
216212

217-
dst.download(host_dst);
218-
219213
CUDA_SANITY_CHECK(dst, 1e-3, ERROR_RELATIVE);
220214
}
221215
else
222216
{
223-
cv::Size dsize(cv::saturate_cast<int>(src.cols * f), cv::saturate_cast<int>(src.rows * f));
224-
cv::Mat dst(dsize, type);
225-
226-
declare.out(dst);
217+
cv::Mat dst;
227218

228219
TEST_CYCLE() cv::resize(src, dst, cv::Size(), f, f, interpolation);
229220

0 commit comments

Comments
 (0)