Skip to main content

//clika-runtime/io.clika.runtime/Ops/contiguous

contiguous

[common]
fun contiguous(input: Tensor, forceCopy: Boolean = false): Tensor

contiguous(input: Tensor, forceCopy: Boolean = false): the contiguous operator. 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.