I would like to suggest adding shuffle2, with variable indices. I have difficulties in assemblyscript, where there are no constexpr arguments and no constexpr arguments are expected (because of this, I can't write SIMD classes).
i8x16.shuffle2(a: v128, b: v128, s: v128) -> v128
def S.shuffle2(a, b, s):
result = S.New()
for i in range(S.Lanes):
if s[i] < S.lanes:
result[i] = a[s[i]]
else:
result[i] = b[s[i] - S.lanes]
return result
I would like to suggest adding shuffle2, with variable indices. I have difficulties in assemblyscript, where there are no constexpr arguments and no constexpr arguments are expected (because of this, I can't write SIMD classes).
i8x16.shuffle2(a: v128, b: v128, s: v128) -> v128