core(stat): create dispatch.cpp file
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sun, 2 Jul 2017 13:13:32 +0000 (13:13 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sun, 2 Jul 2017 22:45:10 +0000 (22:45 +0000)
modules/core/src/stat.dispatch.cpp [new file with mode: 0644]

diff --git a/modules/core/src/stat.dispatch.cpp b/modules/core/src/stat.dispatch.cpp
new file mode 100644 (file)
index 0000000..025c092
--- /dev/null
@@ -0,0 +1,28 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+
+#include "stat.simd.hpp"
+#include "stat.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+
+namespace cv { namespace hal {
+
+int normHamming(const uchar* a, int n)
+{
+    CV_INSTRUMENT_REGION()
+
+    CV_CPU_DISPATCH(normHamming, (a, n),
+        CV_CPU_DISPATCH_MODES_ALL);
+}
+
+int normHamming(const uchar* a, const uchar* b, int n)
+{
+    CV_INSTRUMENT_REGION()
+
+    CV_CPU_DISPATCH(normHamming, (a, b, n),
+        CV_CPU_DISPATCH_MODES_ALL);
+}
+
+}} //cv::hal