Skip to main content

function

logical_and

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

Performs elementwise logical And operation.

An element of the result SIMD vector will be True if the corresponding elements in x and y are both 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 And operation.
  • y (SIMD[bool, simd_width]): Second SIMD vector to perform the And operation.

Returns:

A SIMD vector containing True if the corresponding elements in x and y are both True, otherwise False.