Matmul.Order: type of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matmul Lines 410-425 of bendtorch-core@0.1.0.0/src/tensor/matmul.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&start_line=410&end_line=425 import Base import bendtorch-core@0.1.0.0/src/tensor/parallel.bend as Parallel # Products that read an operand in place. `x @ W^T` and `g^T @ x` read a # transposed operand; instead of building the transpose they read the # operand at the transposed index. An operand of a product is laid out in # one of two orders: `Kept`, as `[outer, inner]`, where term k of output row # (or column) `outer` sits at outer * inner + k; or `Swapped`, as # `[inner, outer]`, where it sits at k * outers + outer. `matmul` is the # product of a `Kept` left and a `Swapped` right operand, `matmul_nt` of two # `Kept` operands and `matmul_tn` of two `Swapped` ones. Cell (row, column) # adds the inner terms in increasing k from +0.0, as `natural_dot` does. The # cells are built by `product_build` below: it forks as `Parallel.build` # forks, and below the forks `product_tree` builds them as `Parallel.tree` # does, except that eight cells below the count and in one output row run # as one loop with eight accumulators (`row_run`). type Order is Data: Kept{} Swapped{} Uses (0):