From 6be7869ae87736770f0971e5c245330a3131b75b Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 14 Mar 2014 16:53:10 +0400 Subject: [PATCH] fix for unsupported doubles --- modules/core/src/ocl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index d424e6bac0..7c4f8de9e0 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -4355,9 +4355,8 @@ int predictOptimalVectorWidth(InputArray src1, InputArray src2, InputArray src3, d.preferredVectorWidthShort(), d.preferredVectorWidthShort(), d.preferredVectorWidthInt(), d.preferredVectorWidthFloat(), d.preferredVectorWidthDouble(), -1 }, width = vectorWidths[depth]; - CV_Assert(width >= 0); - if (ssize.width * cn < width) + if (ssize.width * cn < width || width <= 0) return 1; std::vector offsets, steps, cols;