Skip to main content

function

logical_xor

logical_xor[simd_width: Int](x: SIMD[bool, simd_width], y: SIMD[bool, simd_width]) -> SIMD[bool, $0]

Performs elementwise logical Xor operation.

An element of the result SIMD vector will be True if only one of the corresponding elements in x and y is True, and False otherwise.

Parameters:

  • simd_width (Int): The width of the input and output SIMD vector.

Args:

  • x (SIMD[bool, simd_width]): First SIMD vector to perform the Xor operation.
  • y (SIMD[bool, simd_width]): Second SIMD vector to perform the Xor operation.

Returns:

A SIMD vector containing True if only one of the corresponding elements in x and y is True, otherwise False.