TensorLayout.gather_status: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout Lines 43-53 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=43&end_line=53 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/tensor_view.bend as Views import stelliferous@0.0.2.0/tensor.bend as Tensors # Copy the elements selected by source_view, in its row-major order, into a # new tensor whose storage is laid out as view_shape and labelled target_shape. def gather_status(~Element: Data,name: String,status: Tensors.Status,source_view: Maybe<&2,Views.View>,+view_shape: List<&2,U32>, +target_shape: List<&2,U32>,input: Storage.Buffer,+source_shape: List<&2,U32>,+fill: Element,+workers: U32) -> Tensors.Tensor & Tensors.Tensor: match status: case Tensors.Usable{}: gather_views(~Element,name,source_view,Tensors.view_of(view_shape),Tensors.count_of(view_shape),input,source_shape,target_shape,fill,workers) case Tensors.Failed{+problem}: (Tensors.Tensor{Tensors.buffer(~Element,fill,0),target_shape,fill,Tensors.Failed{problem},workers}, Tensors.Tensor{input,source_shape,fill,Tensors.Failed{problem},workers}) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=Status https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=count_of https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=view_of https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=gather_views https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=View