def copied

stelliferous@0.0.2.0 · tensor_layout.bend:25

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_operations.bend as Operations
import stelliferous@0.0.2.0/tensor.bend as Tensors

25def copied(~Element: Data,name: String,+source_shape: List<&2,U32>,+target_shape: List<&2,U32>,+fill: Element,+workers: U32,
26  result: Operations.Outcome<(Storage.Buffer<Element> & Storage.Buffer<Element>)>) -> Tensors.Tensor<Element> & Tensors.Tensor<Element>:
27  match result:
28    case Operations.Accepted{(input,output)}:
29      (Tensors.Tensor{output,target_shape,fill,Tensors.Usable{},workers},Tensors.Tensor{input,source_shape,fill,Tensors.Usable{},workers})
30    case Operations.Rejected{(input,output)}:
31      (Tensors.Tensor{output,target_shape,fill,Tensors.Failed{Tensors.Problem{name,Tensors.InvalidArgument{source_shape}}},workers},
32        Tensors.Tensor{input,source_shape,fill,Tensors.Usable{},workers})

Uses (11)

Used by (1)