Merge pull request #14687 from terfendail:wint_reducefix

pull/14704/head
Alexander Alekhin 6 years ago
commit 3289a0aff9
  1. 2
      modules/core/include/opencv2/core/hal/intrin_avx.hpp
  2. 3
      modules/core/test/test_intrin_utils.hpp

@ -1083,7 +1083,7 @@ OPENCV_HAL_IMPL_AVX_REDUCE_8(v_int32x8, int, max, _mm_max_epi32)
__m128 v1 = _v256_extract_high(a.val); \
v0 = intrin(v0, v1); \
v0 = intrin(v0, _mm_permute_ps(v0, _MM_SHUFFLE(0, 0, 3, 2))); \
v0 = intrin(v0, _mm_permute_ps(v0, _MM_SHUFFLE(0, 0, 0, 3))); \
v0 = intrin(v0, _mm_permute_ps(v0, _MM_SHUFFLE(0, 0, 0, 1))); \
return _mm_cvtss_f32(v0); \
}

@ -772,6 +772,9 @@ template<typename R> struct TheTest
EXPECT_EQ((LaneType)1, v_reduce_min(a));
EXPECT_EQ((LaneType)R::nlanes, v_reduce_max(a));
EXPECT_EQ((LaneType)((1 + R::nlanes)*R::nlanes/2), v_reduce_sum(a));
dataA[0] += R::nlanes;
R an = dataA;
EXPECT_EQ((LaneType)2, v_reduce_min(an));
return *this;
}

Loading…
Cancel
Save