| 1: | func @shl = <{T: Type, SHIFT_T: Type, MAY_WRAP: Bool}> (lhs: T, rhs: SHIFT_T) -> T; |
Bitwise shift left.
T: type of value to bitwise shift left - must be integral or a vector of integral
SHIFT_T: must be unsigned integral with a width of ceil(log2(@numBits<{T, false}>()))
MAY_WRAP: If true, operation is allowed to wrap
lhs: value to bitwise shift left
rhs: amount to bitwise shift left value by
Returns the result of the bitwise shift left
If T is unsigned integral and MAY_WRAP is false, it is undefined behavior if any 1 bits are shifted out.
If T is signed integral and MAY_WRAP is false, it is undefined behavior if the result is a different sign than lhs.
(TODO)