def with_workers

stelliferous@0.0.2.0 · tensor.bend:164

import stelliferous@0.0.2.0/tensor.bend as Tensor
import Base

164# Sets the worker count, at least one; values and status are unchanged.
165def with_workers(~Element: Data,tensor: Tensor<Element>,+count: U32) -> Tensor<Element>:
166  match tensor:
167    case Tensor{storage,shape,fill,status,workers}: Tensor{storage,shape,fill,status,U32.max(1,count)}
168    case Banded{bands,geometry,shape,fill,status,workers}: Banded{bands,geometry,shape,fill,status,U32.max(1,count)}

Uses (3)

Used by (5)