---
title: "ClikaRT::ops::IndexSlice"
sidebar_label: "IndexSlice"
description: "A [start, stop, step) range at one subscript position. Each slot is an IndexBound: an int literal, a 0-D/1-D integer Tensor, or absent (open bound; absent step is 1)."
---

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

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

**Header:** `ClikaRT/compute/tensor.h`

A `[`[`start`](./IndexSlice.md#start)`, `[`stop`](./IndexSlice.md#stop)`, `[`step`](./IndexSlice.md#step)`)` range at one subscript position. Each slot is an [`IndexBound`](./IndexBound.md): an int literal, a 0-D/1-D integer [Tensor](../Tensor.md), or absent (open bound; absent [`step`](./IndexSlice.md#step) is 1). [`all`](./all.md#all) below is the fully-open slice.

## Member functions

### IndexSlice() {#IndexSlice}

<div class="api-signature">

**`IndexSlice`**() `=default`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/tensor.h`, line 879

</div>

### IndexSlice(IndexBound, IndexBound, IndexBound) {#IndexSlice-2}

<div class="api-signature">

**`IndexSlice`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`IndexBound`](./IndexBound.md) `start_`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`IndexBound`](./IndexBound.md) `stop_`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`IndexBound`](./IndexBound.md) `step_` `=` [`IndexBound`](./IndexBound.md)`{}`<br />
)

</div>

Compose `start:stop:`[`step`](./IndexSlice.md#step); each bound is an int literal, a 0-D integer [Tensor](../Tensor.md), or absent.

<div class="api-declared">

Declared in `ClikaRT/compute/tensor.h`, line 882

</div>

## Data members

### start {#start}

<div class="api-signature">

[`IndexBound`](./IndexBound.md) **`start`**

</div>

first index (absent = from the start)

<div class="api-declared">

Declared in `ClikaRT/compute/tensor.h`, line 875

</div>

### stop {#stop}

<div class="api-signature">

[`IndexBound`](./IndexBound.md) **`stop`**

</div>

one-past-last (absent = to the end)

<div class="api-declared">

Declared in `ClikaRT/compute/tensor.h`, line 876

</div>

### step {#step}

<div class="api-signature">

[`IndexBound`](./IndexBound.md) **`step`**

</div>

stride (absent = 1)

<div class="api-declared">

Declared in `ClikaRT/compute/tensor.h`, line 877

</div>
