Skip to main content

compare_into

Function compare_into 

Source
pub fn compare_into<T, OpA, OpB>(
    dest: &mut StridedViewMut<'_, bool>,
    a: &StridedView<'_, T, OpA>,
    b: &StridedView<'_, T, OpB>,
    op: CompareOp,
) -> Result<()>
where T: Copy + MaybeSendSync + PartialOrd, OpA: ElementOp<T>, OpB: ElementOp<T>,
Expand description

Compare two ordered views elementwise into a Boolean destination.

Unlike embedding a runtime operation match inside a zip_map2_into closure, this entry point selects a fixed comparison before traversal.

ยงErrors

Returns StridedError::ShapeMismatch when the source and destination shapes differ, or StridedError::NonInjectiveOutputLayout when distinct logical destination elements may overlap.