def block_step
stelliferous@0.0.2.0 · tensor_indexed.bend:50
import stelliferous@0.0.2.0/tensor_indexed.bend as TensorIndexed
import Base
import stelliferous@0.0.2.0/traversal_array.bend as Traversal
50def block_step(~Element: Data,~Context: Data,~base: Context -> U32 -> U32,~operation: U32 -> Element -> Element,
51 state: Traversal.State<&1,&1,Array<Element>,Array<Element>,Blocks<Context>>) -> Traversal.State<&1,&1,Array<Element>,Array<Element>,Blocks<Context>>:
52 Traversal.State{input,output,+position,Blocks{+block,+size,+context}} = state
53 next_block(~Element,~Context,block,size,context,
54 Traversal.run(~Array<Element>,~Element,~Block,~read(~Element,~Block,~block_index,~operation),~destination(~Block),U32.to_nat(size),
55 Traversal.State{input,output,position,Block{base(context,block),position}}))