For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
shiftl
def shiftl(a: Scalar, s: Scalar[a.dtype]) -> Scalar[a.dtype]
Shift left/right based on sign of shift for scalars.
Scalar version of shiftl. Left shift if s is positive,
right shift if s is negative.
Args:
- a (
Scalar): The scalar value to shift. - s (
Scalar[a.dtype]): The scalar shift amount. Positive for left, negative right.
Returns:
Scalar[a.dtype]: The shifted scalar value.