ClikaRT::ops::copy
function
copy()
Tensor copy(
Tensor src,
StreamOrDevice target = {},
bool force_copy = true
)
Copies a tensor, optionally to another device or stream.
With the default force_copy = true the result always owns fresh storage; with force_copy = false a same-device copy may pass the input through. target absent = src's own stream.
Parameters
src: the source tensor.target: destination stream or device. Default: stay put.force_copy: always materialize. Defaulttrue.
Throws
ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason ridescode_name()).
Returns: the copy, on target's device; shape and dtype of src.
Declared in ClikaRT/compute/ops.h, line 2001