From c674d3cf49fb3df15f518a64dd783a583cd8d791 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 30 Oct 2013 16:48:12 +0400 Subject: [PATCH 1/2] fixed ocl::norm (with NORM_RELATIVE specified) when norm(src2) == 0 --- modules/ocl/src/arithm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ocl/src/arithm.cpp b/modules/ocl/src/arithm.cpp index ea2eff63fc..9b24b16b0b 100644 --- a/modules/ocl/src/arithm.cpp +++ b/modules/ocl/src/arithm.cpp @@ -688,7 +688,7 @@ double cv::ocl::norm(const oclMat &src1, const oclMat &src2, int normType) break; } if (isRelative) - r = r / norm(src2, normType); + r = r / (norm(src2, normType) + DBL_EPSILON); return r; } From 16df5b007ddd046f53a48597b93fbc628236c3cf Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 30 Oct 2013 17:08:57 +0400 Subject: [PATCH 2/2] disabled upload and download perf tests --- modules/ocl/perf/perf_matrix_operation.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ocl/perf/perf_matrix_operation.cpp b/modules/ocl/perf/perf_matrix_operation.cpp index b2d9a7ef10..f2baa7ffc5 100644 --- a/modules/ocl/perf/perf_matrix_operation.cpp +++ b/modules/ocl/perf/perf_matrix_operation.cpp @@ -156,6 +156,8 @@ PERF_TEST_P(setToFixture, setTo, OCL_PERF_ELSE } +#if 0 + /////////////////// upload /////////////////////////// typedef tuple uploadParams; @@ -228,3 +230,5 @@ PERF_TEST_P(downloadFixture, download, SANITY_CHECK_NOTHING(); } + +#endif