Tensor.scalar_result: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor.bend as Tensor Lines 497-501 of stelliferous@0.0.2.0/tensor.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor.bend&start_line=497&end_line=501 import Base # A reduction as a rank-0 tensor, so a failure propagates like any result. def scalar_result(~Element: Data,+fill: Element,+count: U32,result: Result<&2,&2,Problem,Element>) -> Tensor: match result: case Done{value}: with_workers(~Element,full(~Element,[],value),count) case Fail{problem}: Tensor{buffer(~Element,fill,0),[],fill,Failed{problem},count} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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=Problem 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=full https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=with_workers