def relabel_ready

stelliferous@0.0.2.0 · tensor_layout.bend:116

import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout
import Base
import stelliferous@0.0.2.0/storage_buffer.bend as Storage
import stelliferous@0.0.2.0/tensor.bend as Tensors

116def relabel_ready(~Element: Data,accepted: Bool,storage: Storage.Buffer<Element>,+shape: List<&2,U32>,+target: List<&2,U32>,fill: Element,
117  workers: U32) -> Tensors.Tensor<Element>:
118  match accepted:
119    case True{}: Tensors.Tensor{storage,target,fill,Tensors.Usable{},workers}
120    case False{}: Tensors.Tensor{storage,shape,fill,Tensors.Failed{Tensors.Problem{"reshape",Tensors.ShapeMismatch{shape,target}}},workers}

Uses (8)

Used by (1)