Added simd_extract_lsbs intrinsic as well.

Equivalent to the simd_extract_msbs intrinsic, except it extracts the
least significant bit of each element instead.
This commit is contained in:
Barinzaya
2025-02-24 08:49:57 -05:00
parent 33a3aab791
commit 4afedbc051
5 changed files with 12 additions and 3 deletions
+1
View File
@@ -285,6 +285,7 @@ simd_reduce_xor :: proc(a: #simd[N]T) -> T where type_is_integer(T) || t
simd_reduce_any :: proc(a: #simd[N]T) -> T where type_is_boolean(T) ---
simd_reduce_all :: proc(a: #simd[N]T) -> T where type_is_boolean(T) ---
simd_extract_lsbs :: proc(a: #simd[N]T) -> bit_set[0..<N] where type_is_integer(T) || type_is_boolean(T) ---
simd_extract_msbs :: proc(a: #simd[N]T) -> bit_set[0..<N] where type_is_integer(T) || type_is_boolean(T) ---