---
title: "ClikaRT::ops::maximum"
sidebar_label: "maximum"
description: "Elementwise maximum, NaN-PROPAGATING: a NaN in either operand yields NaN (use ops::fmax for the NaN-ignoring IEEE law). Broadcasts and promotes as add. the broadcast-shaped maxima."
---

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

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

## maximum() {#maximum}

<div class="api-signature">

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

</div>

Elementwise maximum, NaN-PROPAGATING: a NaN in either operand yields NaN (use [`ops::fmax`](./fmax.md#fmax) for the NaN-ignoring IEEE law). Broadcasts and promotes as [`add`](./add.md#add).

**Returns:** the broadcast-shaped maxima.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) when the operand shapes are not broadcast-compatible.

<div class="api-declared">

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

</div>
