You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error you are facing is the expected behavior of NSIMD. Let me give you details: the shr, shl and shra operators work on integer types only (hence the error) and work element-wise. I mean that
v = [1 ; 2 ; 3 ; 4]
v << n == [1 << n ; 2 << n ; 3 << n ; 4 << n]
From what you describe, what you want is a shuffle but we do not have this one yet. Moreover I have questions for you on what you want exactly :
Do you want this shuffle to work on a 4-elements basis i mean given v = [1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ]:
shuffle(v, 1) = [ 2 ; 3 ; 4 ; 1 ; 6 ; 7 ; 8 ; 5 ]
or
shuffle(v, 1) = [ 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 1 ]
?
Do you want it only a 4-elements SIMD vectors? Do your algorithm have this constraint? Do you want it to be length agnostic?
I am asking you these according to #8, there are two ways to have shuffles length angostic.
Issue type: Error
While utilizing the Right shift and Left shift bitwise operators, I'm getting an error:
Reproducing the error
Here is the minimal program to reproduce the issue:
Is there something I'm doing wrong?
Expected behavior
Essentially I wish to change a simd vector, say [1, 2, 3, 4] to look like [0,1,2,3] using the right shift operation.
The text was updated successfully, but these errors were encountered: