---
title: "ClikaRT::spec::SymInt"
sidebar_label: "SymInt"
description: "A tensor dimension: a concrete size, or a symbolic value with inclusive [lower, upper] bounds. Compose with + - * (bounds propagate) and floor_div; compare with eq/ne/lt/le/gt/ge → SymBool."
---

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

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

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

A tensor dimension: a concrete size, or a symbolic value with inclusive `[lower, upper]` bounds. Compose with `+ - *` (bounds propagate) and [`floor_div`](./SymInt.md#floor_div); compare with `eq/ne/lt/le/gt/ge` → [`SymBool`](./SymBool.md).

## Static member functions

### unknown() {#unknown}

<div class="api-signature">

`static` [`SymInt`](./SymInt.md) **`unknown`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::int64_t` `lower` `=` `0`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::int64_t` `upper` `=` [`kUnbounded`](./SymInt.md#kUnbounded),<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::string_view` `label` `=` `""`<br />
)

</div>

A fresh symbolic dimension bounded by `[lower, upper]` (a data-dependent extent). `label` is a debug tag. `upper == `[`kUnbounded`](./SymInt.md#kUnbounded) ⇒ no upper bound.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 82

</div>

## Member functions

### SymInt(int64\_t) {#SymInt}

<div class="api-signature">

**`SymInt`**(`std::int64_t` `concrete`)

</div>

A concrete dimension value; implicit, so a plain integer composes directly.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 68

</div>

### SymInt(SymInt) {#SymInt-2}

<div class="api-signature">

**`SymInt`**(`const SymInt&` `other`)

</div>

Copy: an independent value (a symbolic node, when present, is not shared).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 70

</div>

### SymInt(SymInt) {#SymInt-3}

<div class="api-signature">

**`SymInt`**(`SymInt&&` `other`) `noexcept`

</div>

Move: takes over the symbolic node; `other` reverts to a concrete default.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 72

</div>

### operator=(SymInt) {#operator-assign}

<div class="api-signature">

[`SymInt`](./SymInt.md)`&` **`operator=`**(`const` [`SymInt`](./SymInt.md)`&` `other`)

</div>

Copy-assign; same value semantics as the copy ctor.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 74

</div>

### operator=(SymInt) {#operator-assign-2}

<div class="api-signature">

[`SymInt`](./SymInt.md)`&` **`operator=`**([`SymInt`](./SymInt.md)`&&` `other`) `noexcept`

</div>

Move-assign; same transfer as the move ctor.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 76

</div>

### \~SymInt() {#SymInt-4}

<div class="api-signature">

**`~SymInt`**()

</div>

Releases the symbolic node, if any.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 78

</div>

### operator+() {#operator-plus}

<div class="api-signature">

[`SymInt`](./SymInt.md) **`operator+`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Symbolic-aware `a + b`; the `[lower, upper]` bounds propagate.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 86

</div>

### operator-() {#operator-minus}

<div class="api-signature">

[`SymInt`](./SymInt.md) **`operator-`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Symbolic-aware `a - b`; bounds propagate.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 88

</div>

### operator\*() {#operator-mul}

<div class="api-signature">

[`SymInt`](./SymInt.md) **`operator*`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Symbolic-aware `a * b`; bounds propagate.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 90

</div>

### floor\_div() {#floor_div}

<div class="api-signature">

[`SymInt`](./SymInt.md) **`floor_div`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Floor division. A divide-by-zero (or an unsupported symbolic form) raises [`ClikaRT::Error`](../Error.md).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 94

</div>

### eq() {#eq}

<div class="api-signature">

[`SymBool`](./SymBool.md) **`eq`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 96

</div>

### ne() {#ne}

<div class="api-signature">

[`SymBool`](./SymBool.md) **`ne`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Inequality → [`SymBool`](./SymBool.md) (concrete when both sides are).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 98

</div>

### lt() {#lt}

<div class="api-signature">

[`SymBool`](./SymBool.md) **`lt`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Strict less-than → [`SymBool`](./SymBool.md) (concrete when both sides are).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 100

</div>

### le() {#le}

<div class="api-signature">

[`SymBool`](./SymBool.md) **`le`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Less-or-equal → [`SymBool`](./SymBool.md) (concrete when both sides are).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 102

</div>

### gt() {#gt}

<div class="api-signature">

[`SymBool`](./SymBool.md) **`gt`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Strict greater-than → [`SymBool`](./SymBool.md) (concrete when both sides are).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 104

</div>

### ge() {#ge}

<div class="api-signature">

[`SymBool`](./SymBool.md) **`ge`**(`const` [`SymInt`](./SymInt.md)`&` `other`) `const`

</div>

Greater-or-equal → [`SymBool`](./SymBool.md) (concrete when both sides are).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 106

</div>

### is\_concrete() {#is_concrete}

<div class="api-signature">

`bool` **`is_concrete`**() `const noexcept`

</div>

True when this holds a plain int64 (no symbolic node).

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 109

</div>

### concrete\_value() {#concrete_value}

<div class="api-signature">

`std::optional<std::int64_t>` **`concrete_value`**() `const`

</div>

The size iff [`is_concrete()`](./SymInt.md#is_concrete), else `nullopt`.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 111

</div>

### lower\_bound() {#lower_bound}

<div class="api-signature">

`std::int64_t` **`lower_bound`**() `const`

</div>

Inclusive bounds; for a concrete value both equal it.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 113

</div>

### upper\_bound() {#upper_bound}

<div class="api-signature">

`std::int64_t` **`upper_bound`**() `const`

</div>

Inclusive upper bound; [`kUnbounded`](./SymInt.md#kUnbounded) when none was declared.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 115

</div>

## Static data members

### kUnbounded {#kUnbounded}

<div class="api-signature">

`static` `std::int64_t` **`kUnbounded`** `= INT64_MAX`

</div>

No upper bound (an unbounded symbol). It is declarable, but a dimension that reaches a real allocation needs a finite upper bound; eager allocation refuses an unbounded dim.

<div class="api-declared">

Declared in `ClikaRT/compute/symbolic.h`, line 65

</div>
