TensorLayout.survey: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout Lines 298-312 of stelliferous@0.0.2.0/tensor_layout.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&start_line=298&end_line=312 import Base import stelliferous@0.0.2.0/tensor.bend as Tensors # Summarizes the extents of every part and returns the parts in order. def survey(~Element: Data,parts: Tensors.Parts,+first: List<&2,U32>,+axis: Nat,summary: Survey) -> Tensors.Parts & Survey: match parts: case Tensors.Single{tensor}: Tensors.with_metadata(~Element,~(Tensors.Parts & Survey),tensor,tensor => shape => fill => status => workers => +shape = shape +status = status +workers = workers (Tensors.Single{tensor},surveyed(summary,first,shape,axis,status,workers))) case Tensors.Cons{tensor,rest}: Tensors.with_metadata(~Element,~(Tensors.Parts & Survey),tensor,tensor => shape => fill => status => workers => +shape = shape +status = status +workers = workers prepend_survey(~Element,tensor,survey(~Element,rest,first,axis,surveyed(summary,first,shape,axis,status,workers)))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=Sigma 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.bend&name=Parts https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=with_metadata https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=Survey https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=prepend_survey https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=surveyed