def chosen
import bendtorch-core@0.1.0.0/src/tensor/contracts/fold.bend as Foldimport Base
13def chosen(~O: Data, ~g: O -> F32 -> F32 -> F32, +operation: O, kept: Bool, accumulator: F32, word: F32) -> F32:
14 match kept:
15 case False{}:
16 accumulator
17 case True{}:
18 g(operation, accumulator, word)
Uses (2)
Used by (5)
- bendtorch-core@0.1.0.0/src/tensor/contracts/fold:total
- bendtorch-core@0.1.0.0/src/tensor/contracts/fold:step
- bendtorch-core@0.1.0.0/src/autograd/reduce_fold_PROOF:fiber_total
- bendtorch-core@0.1.0.0/src/autograd/reduce_fold_PROOF:matched_chosen
- bendtorch-core@0.1.0.0/src/tensor/contracts/fold_proof:shift