Skip to main content

ClikaRT::ops::cast_like

function

cast_like()

Tensor cast_like(Tensor x, Tensor reference)

cast to another tensor's dtype: cast(x, reference.dtype()).

Throws

  • ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason rides code_name()).

Returns: x converted to reference's dtype; same shape as x.

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