---
title: "ClikaRT::ops::select"
sidebar_label: "select"
description: "One position along dim (the dim is removed). index is an int literal OR a 0-D integer Tensor (e.g. a shape_host-derived index) so a data-dependent select never reads the value to the host."
---

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

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

## select() {#select}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`select`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`int64_t` `dim`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`IndexBound`](./IndexBound.md) `index`<br />
)

</div>

One position along `dim` (the dim is removed). [`index`](./index-fn.md#index) is an int literal OR a 0-D integer [Tensor](../Tensor.md) (e.g. a [`shape_host`](./shape_host.md#shape_host)-derived index) so a data-dependent select never reads the value to the host.

<div class="api-declared">

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

</div>
