Skip to content

Commit 6a6222d

Browse files
committed
core(stat): remove useless checks
1 parent 880052d commit 6a6222d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

modules/core/src/stat.simd.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ int normHamming(const uchar* a, int n)
2828
int i = 0;
2929
int result = 0;
3030
#if CV_AVX2
31-
if(USE_AVX2)
3231
{
3332
__m256i _r0 = _mm256_setzero_si256();
3433
__m256i _0 = _mm256_setzero_si256();
@@ -52,7 +51,6 @@ int normHamming(const uchar* a, int n)
5251
#endif // CV_AVX2
5352

5453
#if CV_POPCNT
55-
if(checkHardwareSupport(CV_CPU_POPCNT))
5654
{
5755
# if defined CV_POPCNT_U64
5856
for(; i <= n - 8; i += 8)
@@ -68,7 +66,6 @@ int normHamming(const uchar* a, int n)
6866
#endif // CV_POPCNT
6967

7068
#if CV_SIMD128
71-
if(hasSIMD128())
7269
{
7370
v_uint32x4 t = v_setzero_u32();
7471
for(; i <= n - v_uint8x16::nlanes; i += v_uint8x16::nlanes)
@@ -97,7 +94,6 @@ int normHamming(const uchar* a, const uchar* b, int n)
9794
int i = 0;
9895
int result = 0;
9996
#if CV_AVX2
100-
if(USE_AVX2)
10197
{
10298
__m256i _r0 = _mm256_setzero_si256();
10399
__m256i _0 = _mm256_setzero_si256();
@@ -124,7 +120,6 @@ int normHamming(const uchar* a, const uchar* b, int n)
124120
#endif // CV_AVX2
125121

126122
#if CV_POPCNT
127-
if(checkHardwareSupport(CV_CPU_POPCNT))
128123
{
129124
# if defined CV_POPCNT_U64
130125
for(; i <= n - 8; i += 8)
@@ -140,7 +135,6 @@ int normHamming(const uchar* a, const uchar* b, int n)
140135
#endif // CV_POPCNT
141136

142137
#if CV_SIMD128
143-
if(hasSIMD128())
144138
{
145139
v_uint32x4 t = v_setzero_u32();
146140
for(; i <= n - v_uint8x16::nlanes; i += v_uint8x16::nlanes)

0 commit comments

Comments
 (0)