Skip to main content

ClikaRT::ops::copy_

function

copy_()

Tensor& copy_(
    Tensor& self,
    Tensor src,
    StreamOrDevice target = {}
)

Copies src INTO self's existing storage, converting per element to self's dtype in the same single pass (never cast first; the copy IS the cast). Shapes must match after broadcasting src. Raises ClikaRT::Error where the shapes/dtypes cannot be served; returns self under the value surface, Result<void> under the Result surface; CLIKART_CHECK is the mode-stable spelling.

Declared in ClikaRT/compute/ops.h, line 2013