---
title: "ClikaRT::ops::dot"
sidebar_label: "dot"
description: "Inner product of two 1-D tensors. \\[ a \\cdot b = \\sum_i a_i\\,b_i \\] Higher-rank inputs are rejected; use matmul (or inner) for batched contractions. input a 1-D tensor [K]. other a 1-D tensor [K]."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## dot() {#dot}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`dot`**([`Tensor`](../Tensor.md) `input`, [`Tensor`](../Tensor.md) `other`)

</div>

Inner product of two 1-D tensors.

$$
a \cdot b = \sum_i a_i\,b_i
$$

Higher-rank inputs are rejected; use [`matmul`](./matmul.md#matmul) (or [`inner`](./inner.md#inner)) for batched contractions.

**Parameters**

- `input`: a 1-D tensor `[K]`.
- `other`: a 1-D tensor `[K]`.

**Returns:** a 0-D scalar tensor.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) when either operand is not 1-D or the lengths disagree.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 2776

</div>
