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

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

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

# cdist

[common]\
fun [cdist](cdist.md)(x1: [Tensor](../Tensor/index.md), x2: [Tensor](../Tensor/index.md), p: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) = 2.0): [Tensor](../Tensor/index.md)

`cdist(x1: Tensor, x2: Tensor, p: Double = 2.0)`: the `cdist` operator. Pairwise L_p distance between every ROW pair of two matrices. `(B?, M, K) x (B?, N, K) -> (B?, M, N)`; the optional leading batch dims broadcast.