Mojo function
shiftl
shiftl(a: Int, s: Int) -> Int
Shift left or right based on sign of shift amount.
Args:
- a (
Int
): The integer value to be shifted. - s (
Int
): The shift amount. Positive for left shift, negative for right shift.
Returns:
The shifted integer value.
shiftl(a: SIMD[type, 1], s: SIMD[type, 1]) -> SIMD[type, 1]
Shift left or right based on sign of shift amount for scalars.
Args:
- a (
SIMD[type, 1]
): The scalar value to be shifted. - s (
SIMD[type, 1]
): The shift amount. Positive for left shift, negative for right shift.
Returns:
The shifted scalar value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!