build: fix v_reduce_sum4 (requires SSE3)

This commit is contained in:
Alexander Alekhin
2017-06-13 22:24:46 +00:00
parent f49f056d29
commit e23b59da5c
2 changed files with 24 additions and 0 deletions
+18
View File
@@ -741,6 +741,23 @@ template<typename R> struct TheTest
return *this;
}
TheTest & test_reduce_sum4()
{
R a(0.1f, 0.02f, 0.003f, 0.0004f);
R b(1, 20, 300, 4000);
R c(10, 2, 0.3f, 0.04f);
R d(1, 2, 3, 4);
R sum = v_reduce_sum4(a, b, c, d);
Data<R> res = sum;
EXPECT_EQ(0.1234f, res[0]);
EXPECT_EQ(4321.0f, res[1]);
EXPECT_EQ(12.34f, res[2]);
EXPECT_EQ(10.0f, res[3]);
return *this;
}
TheTest & test_loadstore_fp16()
{
#if CV_FP16 && CV_SIMD128
@@ -986,6 +1003,7 @@ TEST(hal_intrin, float32x4) {
.test_float_cvt64()
.test_matmul()
.test_transpose()
.test_reduce_sum4()
;
}