---
title: "ClikaRT::nn::Where"
sidebar_label: "Where"
description: "Elementwise select with broadcasting: input where condition holds, other elsewhere."
---

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

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

**Header:** `ClikaRT/nn/generated/elementwise.h`  
**Inherits:** [`ClikaRT::nn::Module`](./Module.md)

Elementwise select with broadcasting: `input` where `condition` holds, `other` elsewhere. The module form of [`ClikaRT::ops::where`](../ops/where.md#where), which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

## Member functions

### Where() {#Where}

<div class="api-signature">

`explicit` **`Where`**([`WhereOptions`](./WhereOptions.md) `options` `=` `{}`)

</div>

Constructs the module from [`options`](./Where.md#options) (every default when omitted).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 473

</div>

### forward() {#forward}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`forward`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `condition`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `other`<br />
) `const`

</div>

[`forward_impl`](./Where.md#forward), unwrapped: raises [`ClikaRT::Error`](../Error.md) on failure.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 486

</div>

### operator()() {#operator-call}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`operator()`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `condition`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `other`<br />
) `const`

</div>

Same as [`forward`](./Where.md#forward).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 491

</div>

### options() {#options}

<div class="api-signature">

`const` [`WhereOptions`](./WhereOptions.md)`&` **`options`**() `const`

</div>

The settings this module was constructed with.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 496

</div>
