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
permlane_swap
def permlane_swap[dtype: DType, //, stride: Int](val1: Scalar[dtype], val2: Scalar[dtype]) -> SIMD[dtype, 2]
Swaps values between lanes using AMD permlane swap instruction.
Parameters:
- βdtype (
DType): Data type of the values (must be 32-bit type). - βstride (
Int): Swap stride (must be 16 or 32).
Args:
- βval1 (
Scalar[dtype]): First value to swap. - βval2 (
Scalar[dtype]): Second value to swap.
Returns:
SIMD[dtype, 2]: SIMD vector containing the swapped values.