Panther Search Documentation Tutorials Devlogs Downloads Source Code

Documentation > Panther Documentation > Intrinsics > @shlSat

@shlSat

Panther
Documentation


1: func @shlSat = <{T: Type, SHIFT_T: Type}> (lhs: T, rhs: SHIFT_T) -> T;

  Bitwise saturating shift left.

Template Parameters

  T: type of value to bitwise saturating 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}>())) (this restriction most likely will change in the future, but more consideration is required).

Parameters

  lhs: value to bitwise saturating shift left

  rhs: amount to bitwise saturating shift left value by

Return Value

  Returns the result of the bitwise saturating shift left

Example

(TODO)

See Also

@shl Bitwise shift left
@shr Bitwise saturating shift left