mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
added vshuf()
This commit is contained in:
parent
369decd8c3
commit
778d51ac0f
4 changed files with 160 additions and 0 deletions
16
sse4_1.hh
16
sse4_1.hh
|
|
@ -1127,3 +1127,19 @@ inline SIMD<int32_t, 4> vclamp(SIMD<int32_t, 4> x, int32_t a, int32_t b)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline SIMD<uint8_t, 16> vshuf(SIMD<uint8_t, 16> a, SIMD<uint8_t, 16> b)
|
||||
{
|
||||
SIMD<uint8_t, 16> tmp;
|
||||
tmp.m = _mm_shuffle_epi8(a.m, b.m);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline SIMD<int8_t, 16> vshuf(SIMD<int8_t, 16> a, SIMD<uint8_t, 16> b)
|
||||
{
|
||||
SIMD<int8_t, 16> tmp;
|
||||
tmp.m = _mm_shuffle_epi8(a.m, b.m);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue