def surveyed

stelliferous@0.0.2.0 · tensor_layout.bend:285

import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout
import Base
import stelliferous@0.0.2.0/tensor_shape.bend as Shapes
import stelliferous@0.0.2.0/tensor.bend as Tensors

285def surveyed(survey: Survey,+first: List<&2,U32>,+shape: List<&2,U32>,+axis: Nat,status: Tensors.Status,workers: U32) -> Survey:
286  Survey{valid,+total,previous,most} = survey
287  +width = extent_at(shape,axis)
288  Survey{valid && Nat.is_eq(List.length(&2,U32,first),List.length(&2,U32,shape)) &&
289      Shapes.same_extents(List.take(&2,U32,first,axis),List.take(&2,U32,shape,axis)) &&
290      Shapes.same_extents(List.drop(&2,U32,first,1n+axis),List.drop(&2,U32,shape,1n+axis)) &&
291      U32.is_le(width,(4294967295 - total : U32)),
292    (total + width : U32),Tensors.first_failure(previous,status),U32.max(most,workers)}

Uses (17)

Used by (1)