Skip to content

Commit

Permalink
Fix vshuf check
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 11, 2023
1 parent 7ab5aba commit 7909736
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/lsx_misc/vshuf.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Shuffle half words from `b` and `c` with indices from `a`.
```c++
for (int i = 0;i < 8;i++) {
if ((c.half[i] % 16) < 8) {
if ((a.half[i] % 16) < 8) {
dst.half[i] = c.half[a.half[i] % 8];
} else {
dst.half[i] = b.half[a.half[i] % 8];
Expand All @@ -75,7 +75,7 @@ Shuffle words from `b` and `c` with indices from `a`.
```c++
for (int i = 0;i < 4;i++) {
if ((c.word[i] % 8) < 4) {
if ((a.word[i] % 8) < 4) {
dst.word[i] = c.word[a.word[i] % 4];
} else {
dst.word[i] = b.word[a.word[i] % 4];
Expand All @@ -102,7 +102,7 @@ Shuffle words from `b` and `c` with indices from `a`.
```c++
for (int i = 0;i < 2;i++) {
if ((c.word[i] % 4) < 2) {
if ((a.word[i] % 4) < 2) {
dst.word[i] = c.word[a.word[i] % 2];
} else {
dst.word[i] = b.word[a.word[i] % 2];
Expand Down

0 comments on commit 7909736

Please sign in to comment.