def row_of

bendtorch-core@0.1.0.0 · src/tensor/matmul.bend:235

import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matmul
import Base

235# Output cell `position` of a product with `columns` columns sits at row
236# `position / columns` and column `position % columns`, as the digits of the
237# output shape spell them.
238def row_of(+columns: Nat, +position: Nat) -> Nat:
239  Nat.div(position, Nat.mul(columns, 1n))

Uses (3)

Used by (21)