pub fn zip_map2_into<D: Copy + Send + Sync, A: Copy + Send + Sync, B: Copy + Send + Sync, OpA: ElementOp<A>, OpB: ElementOp<B>>(
dest: &mut StridedViewMut<'_, D>,
a: &StridedView<'_, A, OpA>,
b: &StridedView<'_, B, OpB>,
f: impl Fn(A, B) -> D + Sync,
exec: Exec<'_>,
) -> Result<()>Expand description
Binary element-wise operation: dest[i] = f(a[i], b[i]).
Source operands a and b may have different element types from each other
and from dest. The closure f handles per-element type conversion.
ยงErrors
Returns StridedError::RankMismatch or
StridedError::ShapeMismatch when dest and either source view have
different ranks or extents, and
StridedError::NonInjectiveOutputLayout when the destination layout
cannot be proven representable and injective: two logical indices name
one offset, or the element count or address span is too large to
represent. Nothing is written unless validation succeeds.