Skip to content

Commit c45d356

Browse files
committed
core(stat): register dispatched code, fix build
1 parent 6a6222d commit c45d356

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

modules/core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
set(the_description "The Core Functionality")
22

33
ocv_add_dispatched_file(mathfuncs_core SSE2 AVX AVX2)
4+
ocv_add_dispatched_file(stat SSE4_2 AVX AVX2)
45

56
ocv_add_module(core
67
"${OPENCV_HAL_LINKER_LIBS}"

modules/core/src/stat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4233,7 +4233,7 @@ cvNorm( const void* imgA, const void* imgB, int normType, const void* maskarr )
42334233

42344234
namespace cv { namespace hal {
42354235

4236-
static const uchar popCountTable[] =
4236+
extern const uchar popCountTable[256] =
42374237
{
42384238
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
42394239
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,

modules/core/src/stat.simd.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#include "opencv2/core/hal/intrin.hpp"
66

77
namespace cv { namespace hal {
8+
9+
extern const uchar popCountTable[256];
10+
811
CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
912

1013
// forward declarations

0 commit comments

Comments
 (0)