Skip to main content

equal

Function equal 

Source
pub fn equal(input: &Matrix, value: f32) -> Result<Matrix>
Expand description

Compare every FP32 element with one scalar and return an FP32 zero/one mask.

Equality follows the device’s ordinary IEEE comparison: NaN never compares equal, while positive and negative zero compare equal. The result is intentionally detached because a discrete mask has no admitted adjoint.

§Errors

Returns an error when input is not FP32, its element count exceeds the shader ABI, allocation fails, or runtime recording fails.