def flatten_spec
import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as LAWSimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
78def flatten_spec(+dims: List<&2, Nat>, coordinate: Maybe<&2, Shape.Coordinate(dims)>) -> Maybe<&2, U32>:
79 match coordinate:
80 case None{}:
81 None{}
82 case Some{coordinate}:
83 Some{U32.from_nat(Shape.row_major(dims, coordinate))}
Uses (7)
Used by (15)
- bendtorch-core@0.1.0.0/src/tensor/projection_LAWS:offset_spec
- bendtorch-core@0.1.0.0/src/shape/LAWS:project_left_index_refines
- bendtorch-core@0.1.0.0/src/shape/LAWS:project_right_index_refines
- bendtorch-core@0.1.0.0/src/autograd/reduce_fold_PROOF:offsets_walk
- bendtorch-core@0.1.0.0/src/shape/boundary_proofs:flatten_checked
- …