function
is_odd
is_odd(val: Int) -> Bool
Performs elementwise check of whether an integer value is odd.
Args:
- val (
Int
): The int value to check.
Returns:
True if the input is odd and False otherwise.
is_odd[type: DType, simd_width: Int](val: SIMD[type, simd_width]) -> SIMD[bool, $1]
Performs elementwise check of whether SIMD vector contains odd values.
An element of the result SIMD vector will be True if the value is odd, and False otherwise.
Parameters:
- type (
DType
): Thedtype
of the input SIMD vector. - simd_width (
Int
): The width of the input and output SIMD vector.
Args:
- val (
SIMD[type, simd_width]
): The SIMD vector to check.
Returns:
A SIMD vector containing True if the corresponding element in val is odd, otherwise False.