def flatten_words
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layoutimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
260def flatten_words(dims: List<&2, U32>, coordinates: List<&2, U32>, accumulator: U32) -> U32:
261 U32.from_nat(Shape.horner(dims, coordinates, U32.to_nat(accumulator)))
Uses (5)
Used by (15)
- bendtorch-core@0.1.0.0/src/tensor/layout:Mapping
- bendtorch-core@0.1.0.0/src/tensor/layout:map_flat
- bendtorch-core@0.1.0.0/src/tensor/layout:map_roundtrip
- bendtorch-core@0.1.0.0/src/tensor/permutation_mapping:codec_flattened
- bendtorch-core@0.1.0.0/src/tensor/permutation_mapping:coordinate_flatten_exact
- …