TensorAccess.run_guarded: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_access.bend as TensorAccess Lines 34-46 of stelliferous@0.0.2.0/tensor_access.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_access.bend&start_line=34&end_line=46 import Base import stelliferous@0.0.2.0/traversal_array.bend as Traversal import stelliferous@0.0.2.0/traversal_loop.bend as Loop import stelliferous@0.0.2.0/tensor_cursor.bend as Cursor # Runs are used when the cursor starts a full run and count is a whole number # of runs; any other call steps element by element. Both visit the same # elements in the same order. def run_guarded(~Element: Data,~inside: Traversal.State<&1,&1,Array,Array,Cursor.Stride> -> Traversal.State<&1,&1,Array,Array,Cursor.Stride>,~last: Traversal.State<&1,&1,Array,Array,Cursor.Cursor> -> Traversal.State<&1,&1,Array,Array,Cursor.Cursor>,full_run: Bool,whole_runs: Bool,runs: Nat,count: Nat,cursor: Cursor.Cursor,destination: U32, input: Array,output: Array) -> Array & Array: match full_run whole_runs: case True{} True{}: Traversal.finish(~Array,~Element,~Cursor.Cursor, Loop.run(~Traversal.State<&1,&1,Array,Array,Cursor.Cursor>,~run_step(~Element,~inside,~last),runs, Traversal.State{input,output,destination,cursor})) case full_run whole_runs: Traversal.finish(~Array,~Element,~Cursor.Cursor, Loop.run(~Traversal.State<&1,&1,Array,Array,Cursor.Cursor>,~last,count,Traversal.State{input,output,destination,cursor})) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=run_step https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Stride https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=State https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=finish https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_loop.bend&name=run