ClikaRT::ops::contiguous
function
contiguous()
Packs the tensor into row-major contiguous storage.
A no-op passthrough (no copy, same storage) when the input is already contiguous and force_copy is false. Kernels stride natively; call this only when YOUR host-side consumption needs dense memory, never "to be safe" before an op.
Parameters
x: the input tensor (any strides).force_copy: always materialize. Defaultfalse.
Throws
ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason ridescode_name()).
Returns: a contiguous tensor with x's shape, dtype, and values.
Declared in ClikaRT/compute/ops.h, line 1988