def Blk.scale_rows

bend-tensors@0.0.0.2 · bend_tensors.bend:275

import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors
import Base

275# row i scaled by v_i
276def Blk.scale_rows(m: Blk, v: Vec4) -> Blk:
277  Blk{a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23, a30, a31, a32, a33} = m
278  Vec4{+y0, +y1, +y2, +y3} = v
279  Blk{(y0 * a00 : F32), (y0 * a01 : F32), (y0 * a02 : F32), (y0 * a03 : F32),
280      (y1 * a10 : F32), (y1 * a11 : F32), (y1 * a12 : F32), (y1 * a13 : F32),
281      (y2 * a20 : F32), (y2 * a21 : F32), (y2 * a22 : F32), (y2 * a23 : F32),
282      (y3 * a30 : F32), (y3 * a31 : F32), (y3 * a32 : F32), (y3 * a33 : F32)}

Uses (4)

Used by (1)