heuristic for Intel
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Mon, 12 May 2014 08:45:52 +0000 (12:45 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Mon, 12 May 2014 12:08:39 +0000 (16:08 +0400)
modules/core/src/ocl.cpp

index e3cfd8e7cd099afb692acc81c482b3504bd08bc5..ec0efe554ae31e630e9d0aa36880a8313e04773f 100644 (file)
@@ -4414,6 +4414,12 @@ int predictOptimalVectorWidth(InputArray src1, InputArray src2, InputArray src3,
         d.preferredVectorWidthShort(), d.preferredVectorWidthShort(),
         d.preferredVectorWidthInt(), d.preferredVectorWidthFloat(),
         d.preferredVectorWidthDouble(), -1 }, width = vectorWidths[depth];
+    if (d.isIntel())
+    {
+        // it's heuristic
+        int vectorWidthsIntel[] = { 16, 16, 8, 8, 1, 1, 1, -1 };
+        width = vectorWidthsIntel[depth];
+    }
 
     if (ssize.width * cn < width || width <= 0)
         return 1;