Mojo function
sign
sign[dtype: DType, simd_width: Int](x: SIMD[dtype, simd_width]) -> SIMD[dtype, simd_width]
Compute the sign (0, 1) of the input value.
Parameters:
- โdtype (DType): DType used for the computation.
- โsimd_width (Int): SIMD width used for the computation.
Args:
- โx (SIMD): The value to compute the sign operation on.
Returns:
SIMD: The result of the sign operation.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
