---
title: "ClikaRT::ops::all"
sidebar_label: "all"
description: "True where EVERY element over dims is nonzero (logical AND reduce). Empty dims reduces every dimension. Output dtype is always Bool."
---

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

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

## all() {#all}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`all`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ClikaRT::Span`](../Span.md)`<const std::int64_t>` `dims` `=` `{}`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`bool` `keepdim` `=` `false`<br />
)

</div>

True where EVERY element over `dims` is nonzero (logical AND reduce).

Empty `dims` reduces every dimension. Output dtype is always `Bool`. An element is nonzero exactly when its Bool cast is true: +0 and -0 are zero; a subnormal, an infinity and a NaN are nonzero.

**Parameters**

- `input`: the input tensor; any dtype (nonzero = true).
- `dims`: axes to reduce; empty = all axes.
- `keepdim`: keep reduced axes as size-1 dims; default false.

**Returns:** a `Bool` tensor; shape = `input` minus `dims`.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) on an out-of-range `dims` entry.

<div class="api-declared">

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

</div>
