def indexed_leaf

stelliferous@0.0.2.0 · tensor_band.bend:267

import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base
import stelliferous@0.0.2.0/storage_buffer.bend as Storage
import stelliferous@0.0.2.0/storage_allocation.bend as Allocation

267def indexed_leaf(~Element: Data,~operation: U32 -> Element -> Element,
268  +geometry: Geometry,+first: U32,+rows: U32,fill: Element,input: Storage.Buffer<Element>) -> Storage.Buffer<Element>:
269  +count = local_count(geometry,rows)
270  indexed_buffers(~Element,~operation,count,Indexed{geometry,first,rows},input,
271    Allocation.allocate(~Element,Storage.allocation_depth(U32.max(count,1)),fill,U32.to_nat(count)))

Uses (10)

Used by (1)