Skip to main content

copy_transpose_scale_into

Function copy_transpose_scale_into 

Source
pub fn copy_transpose_scale_into<T>(
    dest: &mut StridedViewMut<'_, T>,
    src: &StridedView<'_, T>,
    scale: T,
    exec: Exec<'_>,
) -> Result<()>
where T: Copy + ElementOpApply + Mul<Output = T> + Zero + One + PartialEq + Send + Sync + 'static,
Expand description

Copy with transpose and scaling: dest[j,i] = scale * src[i,j].

§Errors

Returns StridedError::RankMismatch when src or dest is not rank 2, StridedError::ShapeMismatch when dest does not have the transposed extents of src, and StridedError::OffsetOverflow when the element count does not fit in usize. When scale is one and T’s transpose is the identity, the permutation path also returns StridedError::OffsetOverflow when the layout cannot be expressed in isize stride arithmetic or a fused extent overflows, and StridedError::NonInjectiveOutputLayout when the destination layout cannot be proven representable and injective.