def decoded_words_valid

bendtorch-core@0.1.0.0 · src/tensor/permutation_mapping.bend:370

import bendtorch-core@0.1.0.0/src/tensor/permutation_mapping.bend as PermutationMapping
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout

370def decoded_words_valid(+shape: Shape.Shape, +index: U32,
371  +inside: {True{} == Nat.is_lt(U32.to_nat(index), Shape.elements(shape)) : Bool}) ->
372  Layout.WordsValid(Shape.dimensions(shape), Layout.reverse_words(Layout.unflatten_words(Layout.reverse_words(Shape.dimensions(shape)), index))):
373  %Equal.sym(List<&2, U32>, Layout.reverse_words(Layout.unflatten_words(Layout.reverse_words(Shape.dimensions(shape)), index)),
374    Shape.words(Shape.digits(Shape.extents(shape), U32.to_nat(index))), codec_decoded(Shape.dimensions(shape), index)) :
375      Layout.WordsValid(Shape.dimensions(shape), _)
376  words_valid_of(Shape.dimensions(shape), Shape.words(Shape.digits(Shape.extents(shape), U32.to_nat(index))), decoded_word_fits(shape, index, inside))

Uses (18)

Used by (2)