1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

core:ppc Several improvements on VSX(2)

* add v_float64x2 support to v_rotate_*
* treat float vector in v_check_any, vec_any_lt as int vector
* add test case for v_rotate_left
This commit is contained in:
Sayed Adel
2018-05-04 23:09:38 +00:00
parent 60e5e213fd
commit ed19da21ab
2 changed files with 35 additions and 15 deletions
+12 -1
View File
@@ -837,17 +837,28 @@ template<typename R> struct TheTest
Data<R> resC = v_rotate_right<s>(a);
Data<R> resD = v_rotate_right<s>(a, b);
Data<R> resE = v_rotate_left<s>(a);
Data<R> resF = v_rotate_left<s>(a, b);
for (int i = 0; i < R::nlanes; ++i)
{
if (i + s >= R::nlanes)
{
EXPECT_EQ((LaneType)0, resC[i]);
EXPECT_EQ(dataB[i - R::nlanes + s], resD[i]);
EXPECT_EQ((LaneType)0, resE[i - R::nlanes + s]);
EXPECT_EQ(dataB[i], resF[i - R::nlanes + s]);
}
else
{
EXPECT_EQ(dataA[i + s], resC[i]);
}
EXPECT_EQ(dataA[i + s], resD[i]);
EXPECT_EQ(dataA[i], resE[i + s]);
EXPECT_EQ(dataA[i], resF[i + s]);
}
}
return *this;
}