mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 11:44:28 +03:00
Shuffle simd and SuperVector implementetions as well as their test realy fixed
This commit is contained in:
committed by
apostolos
parent
d43d6733b6
commit
1eb3b19f63
@@ -462,7 +462,9 @@ char testbit128(m128 val, unsigned int n) {
|
||||
|
||||
static really_inline
|
||||
m128 pshufb_m128(m128 a, m128 b) {
|
||||
return (m128) vec_perm((uint8x16_t)a, (uint8x16_t)a, (uint8x16_t)b);
|
||||
uint8x16_t mask =(uint8x16_t)vec_cmpge((uint8x16_t)b, (uint8x16_t)vec_splats((uint8_t)0x80));
|
||||
uint8x16_t res = vec_perm ((uint8x16_t)a, (uint8x16_t)a, (uint8x16_t)b);
|
||||
return (m128) vec_sel((uint8x16_t)res, (uint8x16_t)zeroes128(), (uint8x16_t)mask);
|
||||
}
|
||||
|
||||
static really_inline
|
||||
|
@@ -603,7 +603,9 @@ template<>
|
||||
template<>
|
||||
really_inline SuperVector<16> SuperVector<16>::pshufb<false>(SuperVector<16> b)
|
||||
{
|
||||
return (m128) vec_perm((uint8x16_t)u.v128[0], (uint8x16_t)u.v128[0], (uint8x16_t)b.u.v128[0]);
|
||||
uint8x16_t mask =(uint8x16_t)vec_cmpge((uint8x16_t)b.u.v128[0], (uint8x16_t)vec_splats((uint8_t)0x80));
|
||||
uint8x16_t res = vec_perm ((uint8x16_t)u.v128[0], (uint8x16_t)u.v128[0], (uint8x16_t)b.u.v128[0]);
|
||||
return (m128) vec_sel((uint8x16_t)res, (uint8x16_t)vec_splat_s8(0), (uint8x16_t)mask);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
Reference in New Issue
Block a user