-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
174 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 32; i++) { | ||
if (i < 16) { | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
s16 temp = (s16)a.half[i] >> (b.half[i] & 15); | ||
dst.byte[i] = clamp<s16>(temp, -128, 127); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} | ||
for (int i = 16; i < 32; i++) { | ||
if (i < 24) { | ||
s16 temp = (s16)a.half[i - 8] >> (b.half[i - 8] & 15); | ||
dst.byte[i] = clamp<s16>(temp, -128, 127); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 32; i++) { | ||
if (i < 16) { | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
s16 temp = (s16)a.half[i] >> (b.half[i] & 15); | ||
dst.byte[i] = clamp<s16>(temp, 0, 255); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} | ||
for (int i = 16; i < 32; i++) { | ||
if (i < 24) { | ||
s16 temp = (s16)a.half[i - 8] >> (b.half[i - 8] & 15); | ||
dst.byte[i] = clamp<s16>(temp, 0, 255); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
s32 temp = (s32)a.word[i] >> (b.word[i] & 31); | ||
dst.half[i] = clamp<s32>(temp, -32768, 32767); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} | ||
for (int i = 8; i < 16; i++) { | ||
if (i < 12) { | ||
s32 temp = (s32)a.word[i - 4] >> (b.word[i - 4] & 31); | ||
dst.half[i] = clamp<s32>(temp, -32768, 32767); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
s32 temp = (s32)a.word[i] >> (b.word[i] & 31); | ||
dst.half[i] = clamp<s32>(temp, 0, 65535); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} | ||
for (int i = 8; i < 16; i++) { | ||
if (i < 12) { | ||
s32 temp = (s32)a.word[i - 4] >> (b.word[i - 4] & 31); | ||
dst.half[i] = clamp<s32>(temp, 0, 65535); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
for (int i = 0; i < 4; i++) { | ||
if (i < 2) { | ||
s64 temp = (s64)a.dword[i] >> (b.dword[i] & 63); | ||
dst.word[i] = clamp<s64>(temp, -2147483648, 2147483647); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} | ||
for (int i = 4; i < 8; i++) { | ||
if (i < 6) { | ||
s64 temp = (s64)a.dword[i - 2] >> (b.dword[i - 2] & 63); | ||
dst.word[i] = clamp<s64>(temp, -2147483648, 2147483647); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
for (int i = 0; i < 4; i++) { | ||
if (i < 2) { | ||
s64 temp = (s64)a.dword[i] >> (b.dword[i] & 63); | ||
dst.word[i] = clamp<s64>(temp, 0, 4294967295); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} | ||
for (int i = 4; i < 8; i++) { | ||
if (i < 6) { | ||
s64 temp = (s64)a.dword[i - 2] >> (b.dword[i - 2] & 63); | ||
dst.word[i] = clamp<s64>(temp, 0, 4294967295); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 32; i++) { | ||
if (i < 16) { | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
u16 temp = (u16)a.half[i] >> (b.half[i] & 15); | ||
dst.byte[i] = clamp<u16>(temp, 0, 127); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} | ||
for (int i = 16; i < 32; i++) { | ||
if (i < 24) { | ||
u16 temp = (u16)a.half[i - 8] >> (b.half[i - 8] & 15); | ||
dst.byte[i] = clamp<u16>(temp, 0, 127); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 32; i++) { | ||
if (i < 16) { | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
u16 temp = (u16)a.half[i] >> (b.half[i] & 15); | ||
dst.byte[i] = clamp<u16>(temp, 0, 255); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} | ||
for (int i = 16; i < 32; i++) { | ||
if (i < 24) { | ||
u16 temp = (u16)a.half[i - 8] >> (b.half[i - 8] & 15); | ||
dst.byte[i] = clamp<u16>(temp, 0, 255); | ||
} else { | ||
dst.byte[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
u32 temp = (u32)a.word[i] >> (b.word[i] & 31); | ||
dst.half[i] = clamp<u32>(temp, 0, 32767); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} | ||
for (int i = 8; i < 16; i++) { | ||
if (i < 12) { | ||
u32 temp = (u32)a.word[i - 4] >> (b.word[i - 4] & 31); | ||
dst.half[i] = clamp<u32>(temp, 0, 32767); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 16; i++) { | ||
if (i < 8) { | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
u32 temp = (u32)a.word[i] >> (b.word[i] & 31); | ||
dst.half[i] = clamp<u32>(temp, 0, 65535); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} | ||
for (int i = 8; i < 16; i++) { | ||
if (i < 12) { | ||
u32 temp = (u32)a.word[i - 4] >> (b.word[i - 4] & 31); | ||
dst.half[i] = clamp<u32>(temp, 0, 65535); | ||
} else { | ||
dst.half[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
for (int i = 0; i < 4; i++) { | ||
if (i < 2) { | ||
u64 temp = (u64)a.dword[i] >> (b.dword[i] & 63); | ||
dst.word[i] = clamp<u64>(temp, 0, 2147483647); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} | ||
for (int i = 4; i < 8; i++) { | ||
if (i < 6) { | ||
u64 temp = (u64)a.dword[i - 2] >> (b.dword[i - 2] & 63); | ||
dst.word[i] = clamp<u64>(temp, 0, 2147483647); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
for (int i = 0; i < 8; i++) { | ||
if (i < 4) { | ||
for (int i = 0; i < 4; i++) { | ||
if (i < 2) { | ||
u64 temp = (u64)a.dword[i] >> (b.dword[i] & 63); | ||
dst.word[i] = clamp<u64>(temp, 0, 4294967295); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} | ||
for (int i = 4; i < 8; i++) { | ||
if (i < 6) { | ||
u64 temp = (u64)a.dword[i - 2] >> (b.dword[i - 2] & 63); | ||
dst.word[i] = clamp<u64>(temp, 0, 4294967295); | ||
} else { | ||
dst.word[i] = 0; | ||
} | ||
} |