From 2fe07abf83360467a318406dbecb6b32d3b2522f Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 3 Jul 2014 13:45:55 +0400 Subject: [PATCH] use vectors for devices of all vendors --- modules/core/src/ocl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index 0b196d9c5..43e1ab2c9 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -4428,11 +4428,13 @@ int predictOptimalVectorWidth(InputArray src1, InputArray src2, InputArray src3, d.preferredVectorWidthShort(), d.preferredVectorWidthShort(), d.preferredVectorWidthInt(), d.preferredVectorWidthFloat(), d.preferredVectorWidthDouble(), -1 }, kercn = vectorWidths[depth]; - if (d.isIntel()) + + // if the device says don't use vectors + if (vectorWidths[0] == 1) { // it's heuristic - int vectorWidthsIntel[] = { 16, 16, 8, 8, 1, 1, 1, -1 }; - kercn = vectorWidthsIntel[depth]; + int vectorWidthsOthers[] = { 16, 16, 8, 8, 1, 1, 1, -1 }; + kercn = vectorWidthsOthers[depth]; } if (ssize.width * cn < kercn || kercn <= 0)