3.18. __nv_byte_perm
-
i32 @__nv_byte_perm(i32 %x, i32 %y, i32 %z)
Return selected bytes from two 32 bit unsigned integers.
__nv_byte_perm(x,y,s) returns a 32-bit integer consisting of four bytes from eight input bytes provided in the two input integers
xandy, as specified by a selector,s.The input bytes are indexed as follows: The selector indices are as follows (the upper 16-bits of the selector are not used):
- Returns
The returned value r is computed to be:
result[n] := input[selector[n]]whereresult[n]is the nth byte of r.