---
title: "contiguous"
sidebar_label: "contiguous"
description: "Kotlin binding reference: contiguous."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[contiguous](contiguous.md)

# contiguous

[common]\
fun [contiguous](contiguous.md)(input: [Tensor](../Tensor/index.md), forceCopy: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false): [Tensor](../Tensor/index.md)

`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 &quot;to be safe&quot; before an op.