Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -894,13 +894,18 @@ template<typename R> struct TheTest
|
||||
TheTest & test_reduce()
|
||||
{
|
||||
Data<R> dataA;
|
||||
int sum = 0;
|
||||
for (int i = 0; i < R::nlanes; ++i)
|
||||
{
|
||||
sum += (int)(dataA[i]); // To prevent a constant overflow with int8
|
||||
}
|
||||
R a = dataA;
|
||||
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));
|
||||
EXPECT_EQ((LaneType)1, (LaneType)v_reduce_min(a));
|
||||
EXPECT_EQ((LaneType)(R::nlanes), (LaneType)v_reduce_max(a));
|
||||
EXPECT_EQ((int)(sum), (int)v_reduce_sum(a));
|
||||
dataA[0] += R::nlanes;
|
||||
R an = dataA;
|
||||
EXPECT_EQ((LaneType)2, v_reduce_min(an));
|
||||
EXPECT_EQ((LaneType)2, (LaneType)v_reduce_min(an));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1588,6 +1593,7 @@ void test_hal_intrin_uint8()
|
||||
.test_dotprod_expand()
|
||||
.test_min_max()
|
||||
.test_absdiff()
|
||||
.test_reduce()
|
||||
.test_reduce_sad()
|
||||
.test_mask()
|
||||
.test_popcount()
|
||||
@@ -1629,6 +1635,7 @@ void test_hal_intrin_int8()
|
||||
.test_absdiff()
|
||||
.test_absdiffs()
|
||||
.test_abs()
|
||||
.test_reduce()
|
||||
.test_reduce_sad()
|
||||
.test_mask()
|
||||
.test_popcount()
|
||||
|
||||
Reference in New Issue
Block a user