TensorLayout.set_slice: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout Lines 270-279 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=270&end_line=279 import Base import stelliferous@0.0.2.0/tensor.bend as Tensors # target[..., start : start + part extent, ...] = part along axis: the part is # written through the slice of the target that it replaces. def set_slice(~Element: Data,target: Tensors.Tensor,+axis: U32,start: U32,part: Tensors.Tensor) -> Tensors.Tensor: Tensors.with_dense(~Element,~Tensors.Tensor,target,target => target_shape => target_fill => target_status => target_workers => +target_shape = target_shape Tensors.with_dense(~Element,~Tensors.Tensor,part,part => part_shape => part_fill => part_status => part_workers => +part_shape = part_shape result_of(~Element,place_status(~Element,"set_slice",target_status,part_status, sliced(Tensors.view_of(target_shape),axis,start,extent_at(part_shape,U32.to_nat(axis)),1),target,target_shape,target_fill,part,part_shape,part_fill, U32.max(target_workers,part_workers))))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.max https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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=view_of https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=with_dense https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=extent_at https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=place_status https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=result_of https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=sliced