---
title: "ClikaRT::ops"
sidebar_label: "ops"
description: "Namespace ClikaRT::ops"
---

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

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

## Namespaces

| Name | Description |
| --- | --- |
| [`ClikaRT::ops::fused`](./fused/index.md) |  |

## Classes

| Name | Description |
| --- | --- |
| [`EllipsisTag`](./EllipsisTag.md) | `...`: expands to full slices over the dims no other entry names. |
| [`IndexBound`](./IndexBound.md) | An integer-typed op bound, a reshape dim: either a concrete `int64_t` literal or a 0-D/1-D integer [Tensor](../Tensor.md) (e.g. a [`shape_host`](./shape_host.md#shape_host) read), so a shape-consuming argument composes without pulling concrete sizes to the host. Narrower than [`ScalarOrTensor`](./ScalarOrTensor.md) by design: no float ctor ([`reshape`](./reshape.md#reshape)`(x, {1.5})` fails at compile time) and `bool` is deleted (it would otherwise promote silently to an index). |
| [`IndexEntry`](./IndexEntry.md) | One subscript position of [`index`](./index-fn.md#index) / [`index_put`](./index_put.md#index_put), the standard tensor indexing vocabulary: an int (select), a bool (0-D mask), an integer or boolean [Tensor](../Tensor.md) (advanced indexing), an [`IndexSlice`](./IndexSlice.md), [`ellipsis`](./index.md#ellipsis), or [`new_axis`](./index.md#new_axis). A braced integer list indexes via a [Tensor](../Tensor.md) ([`Tensor::from_data`](../Tensor.md#from_data)); pass it as the [Tensor](../Tensor.md) arm. |
| [`IndexSlice`](./IndexSlice.md) | 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. |
| [`NewAxisTag`](./NewAxisTag.md) | numpy `None` / a fresh size-1 dim at this position. |
| [`ScalarOrTensor`](./ScalarOrTensor.md) | A ClikaRT-level value type (NOT op-layer machinery): one optional slot that carries a scalar (a bool, an integer or a double) OR a tensor. Every ctor is implicit on purpose. Pass a bare `bool`, `double`, an integer, a [`Tensor`](../Tensor.md), or `std::nullopt` straight to a [`ScalarOrTensor`](./ScalarOrTensor.md) parameter; spelling the wrap at a call site (`ops::ScalarOrTensor(x)`) is redundant noise. [`ops::ScalarOrTensor`](./ScalarOrTensor.md) remains a valid spelling via the alias below. |

## Enumerations

### enum Activation {#Activation}

<div class="api-signature">

`enum class` **`Activation`** `:` `std::uint8_t`

</div>

A fused activation epilogue. `Identity` = none. The gated kinds (`SwiGlu`, `GeGlu`, `ReGlu`, `Situ`) take a concatenated `[*, 2d]` gate‖up input and emit `[*, d]`, used as a fused projection epilogue.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Identity` | `0` | 0 on purpose: a zero-initialized field means "no activation" |
| `Sigmoid` | `1` |  |
| `Silu` | `2` |  |
| `Relu` | `3` |  |
| `Gelu` | `4` | exact, erf-based |
| `FastGelu` | `5` | the fast approximation (binds the tanh form) |
| `Tanh` | `6` |  |
| `QuickGelu` | `7` | sigmoid approximation: x·sigmoid(1.702·x) |
| `Relu6` | `8` | min(max(x, 0), 6) |
| `TanhGelu` | `9` | the tanh approximation, named |
| `SwiGlu` | `10` |  |
| `GeGlu` | `11` |  |
| `ReGlu` | `12` |  |
| `Situ` | `13` | Soft-capped gated activation; BOTH halves transform: `out = β·tanh(gate/β)·sigmoid(gate) · lβ·tanh(up/lβ)`. The two soft-cap scalars ride [`ops::matmul`](./matmul.md#matmul)/[`ops::linear`](./linear.md#linear) as `situ_beta` (β, the gate cap) and `situ_linear_beta` (lβ, the up cap); both must be \> 0 and come from the model's own config; passing `Situ` without them (or either scalar with any other kind) rejects. Computed at fp32 end-to-end with one demote at the store for f16/bf16 outputs. |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 16

</div>

### enum GeluMode {#GeluMode}

<div class="api-signature">

`enum class` **`GeluMode`** `:` `std::uint8_t`

</div>

GELU approximation: exact (`None`), `Tanh` (the tanh approximation), `Quick` (sigmoid-based), or `Fast`.

| Enumerator | Value | Description |
| --- | --- | --- |
| `None` | `0` |  |
| `Tanh` |  |  |
| `Quick` |  |  |
| `Fast` |  |  |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 45

</div>

### enum RotaryMode {#RotaryMode}

<div class="api-signature">

`enum class` **`RotaryMode`**

</div>

How a rotary embedding pairs the channels it rotates.

| Enumerator | Description |
| --- | --- |
| `NeoX` | split-half: pair (i, i + rotary\_dim/2) |
| `Interleaved` | adjacent-pair: pair (2i, 2i+1) |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 53

</div>

### enum MoeRouting {#MoeRouting}

<div class="api-signature">

`enum class` **`MoeRouting`** `:` `std::uint8_t`

</div>

Mixture-of-Experts routing: how the router logits select the top-k experts and produce the combine weights. Values are PINNED (ABI).

| Enumerator | Value | Description |
| --- | --- | --- |
| `SoftmaxTopK` | `0` | softmax over all experts, then top-k (Mixtral / Qwen / gemma) |
| `TopKSoftmax` | `1` | top-k of the raw logits, then softmax over the k |
| `Sigmoid` | `2` | per-expert sigmoid, then top-k |
| `SigmoidGroupTopK` | `3` | sigmoid + selection bias, group-limited (DeepSeek-V3) |
| `SparseMixer` | `4` | sparse-mixer top-2 (Phi-3.5-MoE) |
| `PreComputed` | `5` | the logits are already the probability grid |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 60

</div>

### enum RoundingMode {#RoundingMode}

<div class="api-signature">

`enum class` **`RoundingMode`** `:` `std::uint8_t`

</div>

Integer-division / floor-div rounding.

| Enumerator | Value | Description |
| --- | --- | --- |
| `None` | `0` |  |
| `Trunc` |  |  |
| `Floor` |  |  |

<div class="api-declared">

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

</div>

### enum ModMode {#ModMode}

<div class="api-signature">

`enum class` **`ModMode`** `:` `std::uint8_t`

</div>

[`mod`](./mod.md#mod) convention: Python (sign follows divisor) or C (sign follows dividend).

| Enumerator | Value | Description |
| --- | --- | --- |
| `Python` | `0` |  |
| `C` |  |  |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 73

</div>

### enum Reduction {#Reduction}

<div class="api-signature">

`enum class` **`Reduction`** `:` `std::uint8_t`

</div>

Loss reduction over the batch.

| Enumerator | Value | Description |
| --- | --- | --- |
| `None` | `0` |  |
| `Mean` |  |  |
| `Sum` |  |  |

<div class="api-declared">

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

</div>

### enum PadMode {#PadMode}

<div class="api-signature">

`enum class` **`PadMode`** `:` `std::uint8_t`

</div>

[`pad`](./pad.md#pad) boundary handling. Constant fills with the given value; Reflect mirrors about the edge (edge sample not repeated); Replicate repeats the edge sample; Circular wraps around.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Constant` | `0` |  |
| `Reflect` |  |  |
| `Replicate` |  |  |
| `Circular` |  |  |

<div class="api-declared">

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

</div>

### enum InterpMode {#InterpMode}

<div class="api-signature">

`enum class` **`InterpMode`** `:` `std::uint8_t`

</div>

Resampling mode for [`ops::interpolate`](./interpolate.md#interpolate) (rank dispatch picks the spatial variant: Linear covers linear/bilinear/trilinear by input rank).

| Enumerator | Value | Description |
| --- | --- | --- |
| `Nearest` | `0` |  |
| `Linear` |  |  |
| `Bicubic` |  |  |
| `Area` |  |  |
| `NearestExact` |  |  |

<div class="api-declared">

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

</div>

### enum ScatterReduceMode {#ScatterReduceMode}

<div class="api-signature">

`enum class` **`ScatterReduceMode`** `:` `std::uint8_t`

</div>

[`scatter_reduce`](./scatter_reduce.md#scatter_reduce) combine op. Sum / Prod / Mean accumulate; AMax / AMin keep the extremum.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Sum` | `0` |  |
| `Prod` |  |  |
| `Mean` |  |  |
| `AMax` |  |  |
| `AMin` |  |  |

<div class="api-declared">

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

</div>

### enum QuantileInterp {#QuantileInterp}

<div class="api-signature">

`enum class` **`QuantileInterp`** `:` `std::uint8_t`

</div>

[`quantile`](./quantile.md#quantile) interpolation between data points. Linear interpolates between the two neighbors; Lower / Higher take a neighbor; Nearest the closer one; Midpoint their mean.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Linear` | `0` |  |
| `Lower` |  |  |
| `Higher` |  |  |
| `Nearest` |  |  |
| `Midpoint` |  |  |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 95

</div>

### enum PixelShuffleMode {#PixelShuffleMode}

<div class="api-signature">

`enum class` **`PixelShuffleMode`** `:` `std::uint8_t`

</div>

[`pixel_shuffle`](./pixel_shuffle.md#pixel_shuffle) channel ordering.

| Enumerator | Value | Description |
| --- | --- | --- |
| `CRD` | `0` |  |
| `DCR` |  |  |

<div class="api-declared">

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

</div>

### enum GridSampleMode {#GridSampleMode}

<div class="api-signature">

`enum class` **`GridSampleMode`** `:` `std::uint8_t`

</div>

[`grid_sample`](./grid_sample.md#grid_sample) interpolation.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Bilinear` | `0` |  |
| `Nearest` |  |  |
| `Bicubic` |  |  |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 101

</div>

### enum GridSamplePaddingMode {#GridSamplePaddingMode}

<div class="api-signature">

`enum class` **`GridSamplePaddingMode`** `:` `std::uint8_t`

</div>

[`grid_sample`](./grid_sample.md#grid_sample) out-of-bounds handling.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Zeros` | `0` |  |
| `Border` |  |  |
| `Reflection` |  |  |

<div class="api-declared">

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

</div>

### enum MeshgridIndexing {#MeshgridIndexing}

<div class="api-signature">

`enum class` **`MeshgridIndexing`** `:` `std::uint8_t`

</div>

[`meshgrid`](./meshgrid.md#meshgrid) output orientation: NumPy's `indexing=` argument. `IJ` (matrix indexing) keeps output shapes in the input order; `XY` (Cartesian) swaps the first two axes.

| Enumerator | Value | Description |
| --- | --- | --- |
| `IJ` | `0` |  |
| `XY` |  |  |

<div class="api-declared">

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

</div>

### enum HashTensorMode {#HashTensorMode}

<div class="api-signature">

`enum class` **`HashTensorMode`** `:` `std::uint8_t`

</div>

[`hash_tensor`](./hash_tensor.md#hash_tensor) combine mode. `XorSum` xor-folds the elements' mixed hashes; order-independent, so a digest survives layout permutations.

| Enumerator | Value | Description |
| --- | --- | --- |
| `XorSum` | `0` |  |

<div class="api-declared">

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

</div>

### enum HashLaneAlgo {#HashLaneAlgo}

<div class="api-signature">

`enum class` **`HashLaneAlgo`** `:` `std::uint8_t`

</div>

[`hash_lanes`](./hash_lanes.md#hash_lanes) permutation. `Auto` picks by the input's lane width: a 32-bit integer lane maps through `Triple32`, a 64-bit lane through `Moremur`. The named kinds select a permutation within that width: `Triple32` and `WeakTwoMul` are 32-bit, `Moremur`, `Feistel3Mul3` and `Feistel4Mul2` are 64-bit; a kind of the other width is refused.

| Enumerator | Value | Description |
| --- | --- | --- |
| `Auto` | `0` |  |
| `Triple32` |  | 32-bit lanes |
| `WeakTwoMul` |  | 32-bit lanes |
| `Moremur` |  | 64-bit lanes |
| `Feistel3Mul3` |  | 64-bit lanes |
| `Feistel4Mul2` |  | 64-bit lanes |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 120

</div>

### enum RopeScaling {#RopeScaling}

<div class="api-signature">

`enum class` **`RopeScaling`**

</div>

RoPE frequency-scaling family (long-context extension). Every family also folds an OPTIONAL 1-D `[rotary_dim/2]` `freq_factors` per-band divisor table into its frequencies (absent ⇒ no division); the 2-D `[2, rotary_dim/2]` short/long-row form belongs to the LongRoPE families alone, which REQUIRE a table in one of the two shapes.

| Enumerator | Description |
| --- | --- |
| `None` | inv\_freq = theta^(-2i/d) |
| `Linear` | position interpolation: angle uses pos / scale |
| `NTK` | static NTK-aware base scaling |
| `DynamicNTK` | NTK with a runtime sequence-length trigger. |
| `YaRN` | wavelength-ramp interpolation (beta\_fast/beta\_slow) |
| `Llama3` | Llama-3.1 piecewise inv\_freq smoothing. |
| `LongRoPE` | per-dim short/long factors; row + attention factor keyed on the BUILT cache length vs original\_max\_pos |
| `Proportional` | zero-tail: first ⌊scale·d/2⌋ bands carry real frequencies (exponent over the full d), the rest are zero (identity rotation) |
| `LongRoPEShort` | LongRoPE, SHORT row pinned statically (row 0); attention factor from the config ratio (`scale`), never the built length. |
| `LongRoPELong` | LongRoPE, LONG row pinned statically (row 1); attention factor from the config ratio (`scale`). |

<div class="api-declared">

Declared in `ClikaRT/compute/op_enums.h`, line 134

</div>

## Variables

### ellipsis {#ellipsis}

<div class="api-signature">

[`EllipsisTag`](./EllipsisTag.md) **`ellipsis`** `{}`

</div>

<div class="api-declared">

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

</div>

### new\_axis {#new_axis}

<div class="api-signature">

[`NewAxisTag`](./NewAxisTag.md) **`new_axis`** `{}`

</div>

<div class="api-declared">

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

</div>

### slice\_all {#slice_all}

<div class="api-signature">

`const` [`IndexSlice`](./IndexSlice.md) **`slice_all`** `{}`

</div>

The fully-open slice (`:`). ([`all`](./all.md#all) is taken by the reduction op.).

<div class="api-declared">

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

</div>

## Functions

| Function | Description |
| --- | --- |
| [`abs`](./abs.md) | Elementwise absolute value. |
| [`abs_`](./abs_.md) | In-place [`abs`](./abs.md#abs): writes the result through `self`; same formula, arguments, and error conditions as [`abs()`](./abs.md#abs). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`acos`](./acos.md) | Elementwise arccosine. |
| [`acos_`](./acos_.md) | In-place [`acos`](./acos.md#acos): writes the result through `self`; same formula, arguments, and error conditions as [`acos()`](./acos.md#acos). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`acosh`](./acosh.md) | Elementwise inverse hyperbolic cosine. |
| [`acosh_`](./acosh_.md) | In-place [`acosh`](./acosh.md#acosh): writes the result through `self`; same formula, arguments, and error conditions as [`acosh()`](./acosh.md#acosh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`adaptive_avg_pool`](./adaptive_avg_pool.md) | Rank-generic adaptive average pooling to a target output size, channels-last. |
| [`adaptive_avg_pool1d`](./adaptive_avg_pool1d.md) | 1-D adaptive average pooling of `[N, L, C]` to `[N, L', C]`; the window geometry is derived from `output_size`. See [`adaptive_avg_pool`](./adaptive_avg_pool.md#adaptive_avg_pool). |
| [`adaptive_avg_pool2d`](./adaptive_avg_pool2d.md) | 2-D adaptive average pooling of `[N, H, W, C]` to `[N, H', W', C]`; windows derived so the output lands exactly on `output_size = {H', W'}`. `{1, 1}` is global average pooling. |
| [`adaptive_avg_pool3d`](./adaptive_avg_pool3d.md) | 3-D adaptive average pooling of `[N, D, H, W, C]` to `[N, D', H', W', C]`. See [`adaptive_avg_pool`](./adaptive_avg_pool.md#adaptive_avg_pool). |
| [`adaptive_max_pool`](./adaptive_max_pool.md) | Rank-generic adaptive MAX pooling to a target output size, channels-last, the max sibling of [`adaptive_avg_pool`](./adaptive_avg_pool.md#adaptive_avg_pool). A window holding any NaN element yields NaN. |
| [`adaptive_max_pool1d`](./adaptive_max_pool1d.md) | 1-D adaptive max pooling of `[N, L, C]` to `[N, L', C]`. See [`adaptive_max_pool`](./adaptive_max_pool.md#adaptive_max_pool). |
| [`adaptive_max_pool2d`](./adaptive_max_pool2d.md) | 2-D adaptive max pooling of `[N, H, W, C]` to `[N, H', W', C]`. `{1, 1}` is global max pooling. See [`adaptive_max_pool`](./adaptive_max_pool.md#adaptive_max_pool). |
| [`adaptive_max_pool3d`](./adaptive_max_pool3d.md) | 3-D adaptive max pooling of `[N, D, H, W, C]` to `[N, D', H', W', C]`. See [`adaptive_max_pool`](./adaptive_max_pool.md#adaptive_max_pool). |
| [`add`](./add.md) <small>(2 overloads)</small> | Adds `other` (scaled) to `input` elementwise. |
| [`add_`](./add_.md) | In-place [`add`](./add.md#add): writes $act(x + \alpha \cdot other)$ through `x`; semantics as [`ops::add`](./add.md#add) (which also documents broadcasting/promotion). ClikaRT::Error as the value form. |
| [`add_layer_norm`](./add_layer_norm.md) | Fused residual-add + normalization, on either side of the norm. Which data flow runs is inferred from which addends you supply; there is no mode flag:residual only → \{ACT(norm(x + residual)·w + b), x + residual\} post\_residual only → \{ACT(norm(x)·w + b) + post\_residual, UNDEFINED\} both → \{ACT(norm(x + residual)·w + b) + post\_residual, x + residual\} neither → raises (that is a plain rms\_norm/layer\_norm) |
| [`add_rms_norm`](./add_rms_norm.md) | Fused residual-add + normalization, on either side of the norm. Which data flow runs is inferred from which addends you supply; there is no mode flag:residual only → \{ACT(norm(x + residual)·w + b), x + residual\} post\_residual only → \{ACT(norm(x)·w + b) + post\_residual, UNDEFINED\} both → \{ACT(norm(x + residual)·w + b) + post\_residual, x + residual\} neither → raises (that is a plain rms\_norm/layer\_norm) |
| [`all`](./all.md) | True where EVERY element over `dims` is nonzero (logical AND reduce). |
| [`allclose`](./allclose.md) | Whether EVERY elementwise pair is approximately equal, a reduction to one verdict. |
| [`amax`](./amax.md) | Maximum value of `input` over `dims`. |
| [`amin`](./amin.md) | Minimum value of `input` over `dims`. |
| [`aminmax`](./aminmax.md) | a 2-element array \{min, max\}. |
| [`any`](./any.md) | True where ANY element over `dims` is nonzero (logical OR reduce). |
| [`arange`](./arange.md) | Evenly stepped 1-D range over the half-open interval `[start, end)`. |
| [`argmax`](./argmax.md) | Index of the maximum of `input` over `dims`. |
| [`argmin`](./argmin.md) | Index of the minimum of `input` over `dims`. |
| [`argsort`](./argsort.md) | Indices that would sort `input` along `dim` (ascending unless `descending`). |
| [`asin`](./asin.md) | Elementwise arcsine. |
| [`asin_`](./asin_.md) | In-place [`asin`](./asin.md#asin): writes the result through `self`; same formula, arguments, and error conditions as [`asin()`](./asin.md#asin). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`asinh`](./asinh.md) | Elementwise inverse hyperbolic sine. |
| [`asinh_`](./asinh_.md) | In-place [`asinh`](./asinh.md#asinh): writes the result through `self`; same formula, arguments, and error conditions as [`asinh()`](./asinh.md#asinh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`atan`](./atan.md) | Elementwise arctangent. |
| [`atan2`](./atan2.md) | Elementwise four-quadrant arc tangent of `a/b` (the angle of the point `(b, a)`), in radians. Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped angles at the promoted float dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`atan2_`](./atan2_.md) | In-place [`atan2`](./atan2.md#atan2): writes the angles through `x`. ClikaRT::Error as the value form. |
| [`atan_`](./atan_.md) | In-place [`atan`](./atan.md#atan): writes the result through `self`; same formula, arguments, and error conditions as [`atan()`](./atan.md#atan). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`atanh`](./atanh.md) | Elementwise inverse hyperbolic tangent. |
| [`atanh_`](./atanh_.md) | In-place [`atanh`](./atanh.md#atanh): writes the result through `self`; same formula, arguments, and error conditions as [`atanh()`](./atanh.md#atanh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`atleast_1d`](./atleast_1d.md) | `input` with leading size-1 dims prepended until rank \>= 1; a higher-rank input passes through unchanged. Returns a VIEW sharing `input`'s storage (no copy). |
| [`atleast_2d`](./atleast_2d.md) | `input` with leading size-1 dims prepended until rank \>= 2 (see [`atleast_1d`](./atleast_1d.md#atleast_1d)). Returns a view (no copy). |
| [`atleast_3d`](./atleast_3d.md) | `input` with leading size-1 dims prepended until rank \>= 3 (see [`atleast_1d`](./atleast_1d.md#atleast_1d)). Returns a view (no copy). |
| [`attention`](./attention.md) | Dense attention with the serving riders: per-head sink, logit soft-cap, sliding window, smoothed softmax. |
| [`attention_over_cache`](./attention_over_cache.md) | Attend a KV cache WITHOUT appending to it (a read-only re-attention). q is packed varlen `[ΣS_q, H, D]` (or hidden-folded `[ΣS_q, num_heads*D]` with `num_heads` set); `cache_key`/`cache_value` are a cache another attention call already appended: continuous head-major `[max_seqs, H_kv, max_seq, D]` with a rank-1 `[B]` `kvcache_start` (the layout selector; its values are not read, and q's position derives from `cu_seqlens_k`), or a paged block pool `[num_blocks, H_kv, block_size, D]` with a rank-2 `[B, max_blocks]` block table (every entry `-1` or in `[0, num_blocks)`, no block index repeated within a row; an out-of-range or repeated entry refuses `INVALID_ARGUMENT` before any read). On the continuous cache `slot_ids` (`[B]` Int32, in range, pairwise distinct) names each batch row's cache row; absent, batch row b reads cache row b. `cu_seqlens_k` is each sequence's TOTAL cached length: per-seq `[B]` or cumulative `[B+1]`. The cache is never written. When `rope_cos`/`rope_sin` are bound, rotary applies to q only (the cached keys are already rotated). Use case: a q-only module re-attending a sibling layer's cache. `head_sink` is the per-head softmax sink `[H_q]`, a virtual logit folded into the softmax denominator, the same contract as [`group_query_attention_varlen`](./group_query_attention_varlen.md#group_query_attention_varlen); it rides the parameter tail here. out\_attn: q's shape with the trailing dim set to the cache's value head size. attention\_over\_cache's qk-norm tail rotates and norms q ONLY; the cached keys were already rotated+normed by the call that appended them; k\_norm\_gain rides along untouched so one argument set serves both the appending and the read-only attention. Same travel rule: gains come WITH qk\_norm\_eps and require the rope planes; absent ⇒ unchanged. kept\_prefix and kv\_position\_offset follow group\_query\_attention\_varlen: the first P keys of each request stay attended beside the window, and a windowed paged cache's served-key offset places the served keys at their absolute positions for the q-only rotation and the window (pass the cache step's kv\_position\_offset through as-is). |
| [`attention_varlen`](./attention_varlen.md) | Variable-length (packed) form of [`attention`](./attention.md#attention): the serving riders over token-packed ragged batches. |
| [`avg_pool`](./avg_pool.md) | Rank-generic average pooling, channels-last. |
| [`avg_pool1d`](./avg_pool1d.md) | 1-D average pooling over `[N, L, C]` (channels-last). See [`avg_pool`](./avg_pool.md#avg_pool); `stride` empty = `kernel_size`. |
| [`avg_pool2d`](./avg_pool2d.md) | 2-D average pooling over `[N, H, W, C]` (channels-last). |
| [`avg_pool3d`](./avg_pool3d.md) | 3-D average pooling over `[N, D, H, W, C]` (channels-last). See [`avg_pool2d`](./avg_pool2d.md#avg_pool2d); parameters extend to `{kD, kH, kW}` etc. |
| [`batch_norm`](./batch_norm.md) | Per-channel batch normalization (inference form), channels-last. |
| [`bernoulli`](./bernoulli.md) | Independent Bernoulli draws from per-element success probabilities. |
| [`bernoulli_`](./bernoulli_.md) | In-place: overwrite `self`, whose values are the per-element success probabilities, with the 0/1 draws (`self[i] ~ Bernoulli(self[i])`). |
| [`binary_cross_entropy`](./binary_cross_entropy.md) | Binary cross-entropy on element-wise PROBABILITIES. |
| [`binary_cross_entropy_with_logits`](./binary_cross_entropy_with_logits.md) | Binary cross-entropy on RAW LOGITS (sigmoid fused, numerically stable). |
| [`bincount`](./bincount.md) | Occurrence count (or weight sum) of each non-negative integer value. |
| [`bitwise_and`](./bitwise_and.md) | Elementwise bitwise AND; the dtype law the whole bitwise family shares: integer and Bool dtypes only, and BOTH operands must carry ONE dtype (no promotion; a mixed pair is refused typed; a scalar `other` adopts `input`'s dtype). Shapes broadcast per the standard rules; the output carries the shared dtype. The other bitwise ops state "dtype law as \`bitwise_and\`" instead of restating this. the broadcast-shaped AND at the operands' shared dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand dtypes differ, for a floating-point operand, or broadcast-incompatible shapes. auto masked = ClikaRT::ops::bitwise\_and(flags, 0x0F); |
| [`bitwise_and_`](./bitwise_and_.md) | In-place [`bitwise_and`](./bitwise_and.md#bitwise_and): writes the AND through `x`. ClikaRT::Error as the value form. |
| [`bitwise_left_shift`](./bitwise_left_shift.md) | Elementwise `a << other`. Integer dtypes only (Bool refuses; a shifted Bool byte has no meaning); otherwise dtype law as [`bitwise_and`](./bitwise_and.md#bitwise_and). The shift is a TOTAL function: a count outside `[0, bit_width)`, negative included, yields the fully shifted-out value (zero fill), identically on every backend. the broadcast-shaped shifted values at the shared dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand dtypes differ, for a floating-point or Bool operand, or broadcast-incompatible shapes. |
| [`bitwise_left_shift_`](./bitwise_left_shift_.md) | In-place [`bitwise_left_shift`](./bitwise_left_shift.md#bitwise_left_shift): writes the shifted values through `x`. ClikaRT::Error as the value form. |
| [`bitwise_not`](./bitwise_not.md) | Elementwise bitwise NOT (`~x`; logical NOT for Bool). Integer and Bool dtypes; the output keeps `input`'s dtype. input's shape and dtype, complemented. ClikaRT::Error (INVALID\_ARGUMENT) for a floating-point operand. |
| [`bitwise_not_`](./bitwise_not_.md) | In-place [`bitwise_not`](./bitwise_not.md#bitwise_not): complements `x` in place. ClikaRT::Error as the value form. |
| [`bitwise_or`](./bitwise_or.md) | Elementwise bitwise OR; dtype law as [`bitwise_and`](./bitwise_and.md#bitwise_and). the broadcast-shaped OR at the operands' shared dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand dtypes differ, for a floating-point operand, or broadcast-incompatible shapes. |
| [`bitwise_or_`](./bitwise_or_.md) | In-place [`bitwise_or`](./bitwise_or.md#bitwise_or): writes the OR through `x`. ClikaRT::Error as the value form. |
| [`bitwise_right_shift`](./bitwise_right_shift.md) | Elementwise `a >> other`. Integer dtypes only (Bool refuses); otherwise dtype law as [`bitwise_and`](./bitwise_and.md#bitwise_and). ARITHMETIC (sign-propagating) for signed dtypes, logical for unsigned; the shift is a TOTAL function; a count outside `[0, bit_width)`, negative included, yields the fully shifted-out value (sign fill 0/-1 for signed, 0 for unsigned), identically on every backend. the broadcast-shaped shifted values at the shared dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand dtypes differ, for a floating-point or Bool operand, or broadcast-incompatible shapes. |
| [`bitwise_right_shift_`](./bitwise_right_shift_.md) | In-place [`bitwise_right_shift`](./bitwise_right_shift.md#bitwise_right_shift): writes the shifted values through `x`. ClikaRT::Error as the value form. |
| [`bitwise_xor`](./bitwise_xor.md) | Elementwise bitwise XOR; dtype law as [`bitwise_and`](./bitwise_and.md#bitwise_and). the broadcast-shaped XOR at the operands' shared dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand dtypes differ, for a floating-point operand, or broadcast-incompatible shapes. |
| [`bitwise_xor_`](./bitwise_xor_.md) | In-place [`bitwise_xor`](./bitwise_xor.md#bitwise_xor): writes the XOR through `x`. ClikaRT::Error as the value form. |
| [`bmm`](./bmm.md) | Batched matrix multiply of two rank-3 tensors, with an optional fused bias and activation epilogue. |
| [`broadcast_tensors`](./broadcast_tensors.md) | Broadcast every input to their common shape: dims are right-aligned, size-1 dims stretch, anything else must match. |
| [`broadcast_to`](./broadcast_to.md) | Alias of [`expand`](./expand.md#expand) under the NumPy name; same broadcasting rules, same view semantics. |
| [`bucketize`](./bucketize.md) | Bucket index of each `input` element against a sorted 1-D `boundaries`. |
| [`cast`](./cast.md) | Same-device dtype conversion. |
| [`cast_like`](./cast_like.md) | [`cast`](./cast.md#cast) to another tensor's dtype: [`cast`](./cast.md#cast)`(x, reference.dtype())`. |
| [`causal_conv_update`](./causal_conv_update.md) | Depthwise causal short-conv serving step over a rolling per-sequence window. `x [B, S, dim]`; `weight [dim, W]` (oldest tap first); optional `bias [dim]`; `state [B, dim, W]` (same dtype as x) is read AND updated IN PLACE in both modes: S \> 1 runs the prefill conv with each row's left context seeded from its window (a zero window is a fresh sequence, bit for bit; an S-token call over committed state equals S single-token steps exactly) and re-captures the window as the last W of (old window ++ the row's valid inputs; zero valid tokens leave it unchanged); S == 1 shift-inserts the new token and emits the tap dot. `seq_lens` (`[B]` Int32) bounds ragged prefill rows (their padding is zero post-activation). `activation` applies to the returned `out [B, S, dim]` only (Silu fuses in-kernel); the stored window stays pre-activation raw. `slot_ids` (`[B]` Int32, device-resident) addresses `state` as a SLAB `[num_slots, dim, W]`: batch row `b` reads/updates slab row `slot_ids[b]` in place (ids in range and DISTINCT per call, the caller's contract); absent keeps state row `b`. |
| [`cdist`](./cdist.md) | Pairwise L\_p distance between every ROW pair of two matrices. |
| [`ceil`](./ceil.md) | Elementwise ceiling: the smallest integer not below `input`. |
| [`ceil_`](./ceil_.md) | In-place [`ceil`](./ceil.md#ceil): writes the result through `self`; same formula, arguments, and error conditions as [`ceil()`](./ceil.md#ceil). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`celu`](./celu.md) | Continuously differentiable exponential linear unit. |
| [`celu_`](./celu_.md) | In-place [`celu`](./celu.md#celu): writes the result through `self`; same formula, arguments, and error conditions as [`celu()`](./celu.md#celu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`chunk`](./chunk.md) | Split along `dim` into `num_chunks` near-equal parts (the last may be shorter). Returns VIEWS sharing the source's storage (one call, no copy); prefer it over repeated [`narrow`](./narrow.md#narrow)s. |
| [`circular_pad`](./circular_pad.md) | [`pad`](./pad.md#pad) in wrap-around mode: the padding continues from the opposite edge. Same `(lo, hi)` pair layout as [`constant_pad`](./constant_pad.md#constant_pad). Copies. |
| [`clamp`](./clamp.md) | Clamp `input` into \[min, max\]; an empty bound leaves that side unbounded. |
| [`clamp_`](./clamp_.md) | In-place [`clamp`](./clamp.md#clamp): writes the result through `self`; same formula, arguments, and error conditions as [`clamp()`](./clamp.md#clamp). Either bound may be absent (`std::nullopt`), a one-sided clamp; tensor bounds broadcast against `self`. A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`clamp_max`](./clamp_max.md) | Elementwise upper bound. |
| [`clamp_max_`](./clamp_max_.md) | In-place [`clamp_max`](./clamp_max.md#clamp_max): writes the result through `self`; same formula, arguments, and error conditions as [`clamp_max()`](./clamp_max.md#clamp_max). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`clamp_min`](./clamp_min.md) | Elementwise lower bound. |
| [`clamp_min_`](./clamp_min_.md) | In-place [`clamp_min`](./clamp_min.md#clamp_min): writes the result through `self`; same formula, arguments, and error conditions as [`clamp_min()`](./clamp_min.md#clamp_min). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`clone`](./clone.md) | Deep copy on the same device: fresh storage, identical shape, dtype, and values. Equivalent to `copy(src)` with the defaults. |
| [`concat`](./concat.md) | Join tensors along an EXISTING dim: all inputs share rank and off-dim extents; the `dim` extents add up. Copies into fresh storage. |
| [`constant_pad`](./constant_pad.md) | [`pad`](./pad.md#pad) with a constant fill. |
| [`contiguous`](./contiguous.md) | Packs the tensor into row-major contiguous storage. |
| [`conv`](./conv.md) | Convolution family, channels-last (`[N, spatial..., C]`), weights output-channel-first (`[O, spatial..., Ig]`). `stride` / `dilation` / `output_padding` are PER-AXIS window attributes everywhere: length 0 (defaulted), 1 (broadcast), or spatial-rank. `padding` carries TWO conventions; read the one that matches the op:conv / conv\_transpose\*: interleaved (lo, hi) PAIRS in axis order (even length; pair i pads spatial axis i); asymmetric pads spell directly, e.g. 1-D \{2, 3\} = lo 2, hi 3. conv1d/2d/3d: SYMMETRIC per-axis widths (length 0/1/spatial-rank), e.g. 1-D \{2\} = lo 2, hi 2; an asymmetric pad needs conv or an explicit ops::pad first. The inline defaults below encode the split: conv1d pads \{0\}, conv\_transpose1d pads \{0, 0\}. |
| [`conv1d`](./conv1d.md) | 1-D convolution over a channels-last input. |
| [`conv2d`](./conv2d.md) | 2-D convolution over a channels-last input. |
| [`conv3d`](./conv3d.md) | 3-D convolution over a channels-last input. |
| [`conv_transpose`](./conv_transpose.md) | Rank-polymorphic (1-D/2-D/3-D) transposed (fractionally-strided) convolution (learnable upsampling). |
| [`conv_transpose1d`](./conv_transpose1d.md) | 1-D transposed (fractionally-strided) convolution (learnable upsampling). |
| [`conv_transpose2d`](./conv_transpose2d.md) | 2-D transposed (fractionally-strided) convolution (learnable upsampling). |
| [`conv_transpose3d`](./conv_transpose3d.md) | 3-D transposed (fractionally-strided) convolution (learnable upsampling). |
| [`copy`](./copy.md) | Copies a tensor, optionally to another device or stream. |
| [`copy_`](./copy_.md) | Copies `src` INTO `self`'s existing storage, converting per element to `self`'s dtype in the same single pass (never [`cast`](./cast.md#cast) first; the copy IS the cast). Shapes must match after broadcasting `src`. Raises [`ClikaRT::Error`](../Error.md) where the shapes/dtypes cannot be served; returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`copy_into`](./copy_into.md) | Write `src` into the caller-supplied `out` buffer (the destination-first spelling of the in-place copy; bind a persistent buffer once, write it every step with no allocation). Dtype conversion is interleaved with the write; a cross-device `src` is transferred first. Returns `out`. |
| [`copy_to_cpu`](./copy_to_cpu.md) | Materializes a host-resident copy of the tensor (device-to-host transfer; an owning CPU tensor even when `src` is already on the CPU). |
| [`copysign`](./copysign.md) | Elementwise `|a|` carrying the sign of `other`. Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped result at the promoted dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`copysign_`](./copysign_.md) | In-place [`copysign`](./copysign.md#copysign): writes the re-signed magnitudes through `x`. ClikaRT::Error as the value form. |
| [`cos`](./cos.md) | Elementwise cosine. |
| [`cos_`](./cos_.md) | In-place [`cos`](./cos.md#cos): writes the result through `self`; same formula, arguments, and error conditions as [`cos()`](./cos.md#cos). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`cosh`](./cosh.md) | Elementwise hyperbolic cosine. |
| [`cosh_`](./cosh_.md) | In-place [`cosh`](./cosh.md#cosh): writes the result through `self`; same formula, arguments, and error conditions as [`cosh()`](./cosh.md#cosh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`cosine_similarity`](./cosine_similarity.md) | Cosine similarity along `dim`. |
| [`count_nonzero`](./count_nonzero.md) | Number of nonzero elements over `dims`. |
| [`cross`](./cross.md) | 3-vector cross product along `dim`. |
| [`cross_entropy`](./cross_entropy.md) | Cross-entropy loss over class LOGITS; the class dim is LAST. |
| [`cummax`](./cummax.md) | a 2-element array \{values, indices\}. |
| [`cummin`](./cummin.md) | a 2-element array \{values, indices\}. |
| [`cumprod`](./cumprod.md) | Cumulative product along `dim` (inclusive scan). |
| [`cumprod_`](./cumprod_.md) | In-place [`cumprod`](./cumprod.md#cumprod): rewrites `self` with its inclusive prefix products along `dim` and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. ClikaRT::Error as cumprod. |
| [`cumsum`](./cumsum.md) | Cumulative sum along `dim` (inclusive scan). |
| [`cumsum_`](./cumsum_.md) | In-place [`cumsum`](./cumsum.md#cumsum): rewrites `self` with its inclusive prefix sums along `dim` and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. ClikaRT::Error as cumsum. |
| [`deform_conv`](./deform_conv.md) | Deformable convolution, 1-D/2-D/3-D (rank derives from `input`), channels-last: `x [N, D1..Dr, C]`, `weight [O, K1..Kr, C/groups]` (OHWI), `offset [N, out-spatial..., offset_groups·∏K·r]`, `mask [N, out-spatial..., offset_groups·∏K]` (absent ⇒ unmodulated), `bias [O]`; returns `[N, out-spatial..., O]` at `input`'s dtype. Each kernel tap samples at `out·stride − pad_lo + tap·dilation + Δ` (pixel units, bilinear; out-of-bounds reads 0); the offset channel for (group `g`, tap `t`, axis `d`) is `(g·∏K + t)·r + d` with taps row-major over the kernel and axes in layout order (2-D: Δh then Δw). `padding` is interleaved `(lo, hi)` pairs over the spatial axes; `stride`/`dilation` broadcast per spatial axis (empty ⇒ 1). All floating inputs must share `input`'s dtype (f32/f64/f16/bf16; no silent promotion); `activation` is a fused elementwise epilogue applied after bias. |
| [`deg2rad`](./deg2rad.md) | Converts degrees to radians elementwise: $x \cdot \pi / 180$. input's shape at its (float-promoted) dtype. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`deg2rad_`](./deg2rad_.md) | In-place [`deg2rad`](./deg2rad.md#deg2rad): writes the radians through `x`. ClikaRT::Error as the value form. |
| [`dequantize`](./dequantize.md) |  |
| [`dequantize_`](./dequantize_.md) |  |
| [`diag`](./diag.md) | Rank-1 \<-\> rank-2 diagonal converter. |
| [`diag_embed`](./diag_embed.md) | Embed the LAST dim along the diagonal of a fresh `(dim1, dim2)` plane: output rank = input rank + 1, both new dims sized `last + |offset|`, the inverse of [`diagonal`](./diagonal.md#diagonal). Defaults place the plane at the trailing two dims. Copies. |
| [`diagonal`](./diagonal.md) | Extract the `offset`-th diagonal between `dim1` and `dim2`: the two source dims are removed and a trailing dim of the diagonal's length is appended (rank - 1 total). Copies into fresh storage (deliberately not a view). |
| [`diff`](./diff.md) | n-th order finite difference along `dim`. |
| [`div`](./div.md) <small>(2 overloads)</small> | Divides `input` by `other` elementwise, with an optional quotient rounding. |
| [`div_`](./div_.md) | In-place [`div`](./div.md#div): writes the (optionally rounded) quotient through `x`. ClikaRT::Error as the value form. |
| [`dot`](./dot.md) | Inner product of two 1-D tensors. |
| [`dynamic_quantize`](./dynamic_quantize.md) |  |
| [`einsum`](./einsum.md) | Einstein-summation contraction from a notation string. |
| [`elu`](./elu.md) | Exponential linear unit. |
| [`elu_`](./elu_.md) | In-place [`elu`](./elu.md#elu): writes the result through `self`; same formula, arguments, and error conditions as [`elu()`](./elu.md#elu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`embedding`](./embedding.md) | Embedding lookup: gathers rows of `weight` by `indices`, with an optional bias + activation epilogue. |
| [`empty`](./empty.md) | Uninitialized tensor of the given shape; the contents are whatever the allocator hands back; write every element before reading any. |
| [`empty_like`](./empty_like.md) | Uninitialized tensor with `reference`'s shape and dtype. |
| [`empty_strided`](./empty_strided.md) | Uninitialized tensor with caller-chosen sizes AND strides (element units). |
| [`eq`](./eq.md) | Elementwise equality `a == other`, the output contract the whole comparison family shares: the result is a `Bool` tensor at the broadcast shape (operands promote to their dominant dtype before the compare). A scalar `other` compares against every element. The other comparisons state "output as \`eq\`" instead of restating this. the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. auto hits = ClikaRT::ops::eq(ids, pad\_id); // Bool mask |
| [`eq_`](./eq_.md) | In-place [`eq`](./eq.md#eq): writes the comparison result through `x` (`x` keeps its own dtype; true/false land as one/zero). ClikaRT::Error as the value form. |
| [`erf`](./erf.md) | Elementwise Gauss error function. |
| [`erf_`](./erf_.md) | In-place [`erf`](./erf.md#erf): writes the result through `self`; same formula, arguments, and error conditions as [`erf()`](./erf.md#erf). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`erfc`](./erfc.md) | Elementwise complementary error function. |
| [`erfc_`](./erfc_.md) | In-place [`erfc`](./erfc.md#erfc): writes the result through `self`; same formula, arguments, and error conditions as [`erfc()`](./erfc.md#erfc). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`erfinv`](./erfinv.md) | Elementwise inverse error function. |
| [`erfinv_`](./erfinv_.md) | In-place [`erfinv`](./erfinv.md#erfinv): writes the result through `self`; same formula, arguments, and error conditions as [`erfinv()`](./erfinv.md#erfinv). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`exp`](./exp.md) | Elementwise natural exponential. |
| [`exp_`](./exp_.md) | In-place [`exp`](./exp.md#exp): writes the result through `self`; same formula, arguments, and error conditions as [`exp()`](./exp.md#exp). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`expand`](./expand.md) | Broadcast `input` to a larger shape WITHOUT copying. |
| [`expand_as`](./expand_as.md) | [`expand`](./expand.md#expand) to `other`'s shape; `other` supplies extents only; its data is never read. Same broadcasting rules and view semantics as [`expand`](./expand.md#expand). |
| [`exponential_`](./exponential_.md) | In-place exponential fill with rate `lambd`: overwrites `self` with draws from `p(x) = lambd * `[`exp`](./exp.md#exp)`(-lambd * x)` (x \>= 0) and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`eye`](./eye.md) | A 2-D identity matrix `[n, m]`: `1` on the diagonal, `0` elsewhere; `m` defaults to `n` (square). |
| [`fast_gelu`](./fast_gelu.md) | FastGELU: the tanh GELU approximation as a standalone op. |
| [`fill`](./fill.md) | A new tensor with `input`'s shape and dtype, every element set to `value`. |
| [`fill_`](./fill_.md) | In-place [`fill`](./fill.md#fill): overwrites every element of `self` with `value`; same arguments and error conditions as [`fill()`](./fill.md#fill). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`fill_diagonal`](./fill_diagonal.md) | A copy of the 2-D matrix `input` with `fill_value` written along its diagonal. |
| [`fill_diagonal_`](./fill_diagonal_.md) | In-place [`fill_diagonal`](./fill_diagonal.md#fill_diagonal): writes the diagonal through `self`; same arguments and error conditions as [`fill_diagonal()`](./fill_diagonal.md#fill_diagonal). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`flatten`](./flatten.md) | Collapse the INCLUSIVE dim range `[start_dim, end_dim]` into one dim; the defaults collapse everything to 1-D. |
| [`flip`](./flip.md) | Reverse the element order along each dim in `dims`. |
| [`fliplr`](./fliplr.md) | [`flip`](./flip.md#flip) on dim 1: reverse each row's column order. Input rank must be \>= 2. Copies. |
| [`flipud`](./flipud.md) | [`flip`](./flip.md#flip) on dim 0: reverse the leading dim's order. Copies. |
| [`floor`](./floor.md) | Elementwise floor: the largest integer not above `input`. |
| [`floor_`](./floor_.md) | In-place [`floor`](./floor.md#floor): writes the result through `self`; same formula, arguments, and error conditions as [`floor()`](./floor.md#floor). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`floor_divide`](./floor_divide.md) | Elementwise [`floor`](./floor.md#floor)`(a / other)`, i.e. [`ops::div`](./div.md#div) with [`RoundingMode::Floor`](./index.md#RoundingMode). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped floored quotient. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`floor_divide_`](./floor_divide_.md) | In-place [`floor_divide`](./floor_divide.md#floor_divide): writes the floored quotient through `x`. ClikaRT::Error as the value form. |
| [`fmax`](./fmax.md) | Elementwise IEEE 754 maximum, NaN-IGNORING: where one operand is NaN the other value wins (both NaN gives NaN). For the NaN-propagating law use [`ops::maximum`](./maximum.md#maximum). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped maxima. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`fmin`](./fmin.md) | Elementwise IEEE 754 minimum, NaN-IGNORING (the [`fmax`](./fmax.md#fmax) dual). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped minima. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`fmod`](./fmod.md) | Elementwise remainder with the sign of the DIVIDEND, i.e. [`ops::mod`](./mod.md#mod) with [`ModMode::C`](./index.md#ModMode). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped remainders. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`fmod_`](./fmod_.md) | In-place [`fmod`](./fmod.md#fmod): writes the remainders through `x`. ClikaRT::Error as the value form. |
| [`fold`](./fold.md) | col2im: the inverse of [`unfold`](./unfold.md#unfold); it sums overlapping windows back into a channels-last image. |
| [`frac`](./frac.md) | Elementwise fractional part. |
| [`frac_`](./frac_.md) | In-place [`frac`](./frac.md#frac): writes the result through `self`; same formula, arguments, and error conditions as [`frac()`](./frac.md#frac). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`frexp`](./frexp.md) | Decomposes each element into `mantissa * 2^exponent` with `|mantissa| in [0.5, 1)`. Floating-point inputs only. The mantissa keeps the input's dtype (Float32 for the bit-packed sub-byte float formats, whose value grids cannot hold the mantissa range); the exponent is Int32. a 2-element array \{mantissa, exponent\}. |
| [`from_blob`](./from_blob.md) | Wrap caller-owned memory as a [Tensor](../Tensor.md) (no copy, no allocation). |
| [`full`](./full.md) | A new tensor of the given shape with every element set to `fill_value`. |
| [`full_like`](./full_like.md) | A new tensor with `reference`'s shape and dtype, filled with `fill_value`. |
| [`gated_delta_update`](./gated_delta_update.md) | Gated delta-rule recurrence step: per token, the `[B, HV, K, V]` Float32 `state` decays by `exp(g)`, takes the delta-rule rank-1 update `(beta·k) ⊗ (v − Sᵀk)`, and emits `o = (scale·q)ᵀ S`, updated IN PLACE. The gate's RANK picks the family: `[B, T, HV]` = one scalar per value head; `[B, T, HV, K]` = per key dim. q/k `[B, T, H, K]` (HV % H == 0, grouped heads), v `[B, T, HV, V]`, beta `[B, T, HV]`; `scale` defaults to K^-1/2; `seq_lens` (`[B]` Int32) bounds ragged prefill rows. `slot_ids` (`[B]` Int32, device-resident) addresses `state` as a SLAB `[num_slots, HV, K, V]`: batch row `b` reads/updates slab row `slot_ids[b]` in place (ids in range and DISTINCT per call, the caller's contract); absent keeps state row `b`. TWO gate forms, told apart by which inputs are bound: with `gate_bias` and `gate_scale` absent, `gate` IS the log-space decay (Float32 or the activations' dtype); with both bound (Float32 `gate_bias` `[HV]` beside a `[B, T, HV]` gate or `[HV, K]` beside a `[B, T, HV, K]` one, the checkpoint's `dt_bias`; Float32 `gate_scale` `[HV]`, the once-folded `-exp(A_log)`), `gate` is the RAW gate projection slice at the activations' dtype and the kernel forms the decay `gate_scale * `[`softplus`](./softplus.md#softplus)`(g + gate_bias)` in fp32 registers, so no add / softplus / mul pass and no fp32 transient precede the call. One without the other rejects; a backend without the raw-gate arm declines it typed. |
| [`gated_rms_norm`](./gated_rms_norm.md) | Fused group RMS norm + post-norm silu(z) gate: `out = rms_norm(x) · silu(z)`, the norm taken over the trailing `normalized_shape` group extent (`{vd}` for a per-head norm over `[.., HV, vd]`). `weight` is the optional `[group]` gamma applied after the normalization; an absent `eps` takes the runtime's rms-norm default. |
| [`gather`](./gather.md) | Axis-wise gather: read `input` at positions given by [`index`](./index-fn.md#index) along `dim`. |
| [`ge`](./ge.md) | Elementwise `a >= other`; output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`ge_`](./ge_.md) | In-place [`ge`](./ge.md#ge): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`geglu`](./geglu.md) | GeGLU gated activation over a concatenated gate‖up tensor. |
| [`gelu`](./gelu.md) | Gaussian error linear unit. |
| [`gelu_`](./gelu_.md) | In-place [`gelu`](./gelu.md#gelu): writes the result through `self`; same formula, arguments, and error conditions as [`gelu()`](./gelu.md#gelu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`generate_rotary_cache`](./generate_rotary_cache.md) | The rotary angle tables of one context-scaling family: [`cos`](./cos.md#cos) and [`sin`](./sin.md#sin), each `[max_positions, rotary_dim / 2]` Float32. |
| [`glu`](./glu.md) | Gated linear unit: splits `input` in half along `dim` and gates the first half with the sigmoid of the second. |
| [`grid_sample`](./grid_sample.md) | Samples a channels-last input at arbitrary grid coordinates. |
| [`group_norm`](./group_norm.md) | Group normalization: channels split into `num_groups` groups, normalized per group (channels-last). |
| [`group_query_attention`](./group_query_attention.md) | Fused GQA with RoPE + KV cache. Bind `out_present_key`/`out_present_value` to the same buffers as `past_key`/`past_value` (a `KVCache::keys`/`values(layer)` view) + pass `kvcache_start` to append the new post-RoPE K/V IN PLACE into the cache (the decode perf path). q/k/v are hidden-folded `[ΣS, heads*head_dim]`; `num_heads`/`kv_num_heads` drive the in-op head split (GQA). `head_sink` is the per-head softmax sink `[H_q]`, a virtual logit folded into the softmax denominator (attention-sink models bind one per layer), the same contract as [`group_query_attention_varlen`](./group_query_attention_varlen.md#group_query_attention_varlen); it rides the parameter tail here. `q_norm_gain`/`k_norm_gain` engage the POST-rope per-head RMS norm: after the in-op rotation, every head's `[head_dim]` q (and new-k) vector is RMS-normalized with the gain BEFORE any cache append, so the cache holds rotated+normed keys. Each gain is rank-1 `[head_dim]` (one vector shared across heads; any other shape rejects), any float dtype, applied at its own dtype. The gains require the in-op rope planes (`rope_cos`/`rope_sin`), and they travel WITH `qk_norm_eps`: pass the model's own rms-norm epsilon alongside the gains, or neither (a gain without the epsilon, or an epsilon with no gain, rejects). Absent ⇒ the gain-less path, unchanged. A rope-free per-head norm composes [`qk_rms_norm`](./qk_rms_norm.md#qk_rms_norm) instead. `slot_ids` (`[B]` Int32) names the cache row each batch row appends to and attends from on a continuous `[max_seqs, H_kv, max_seq, D]` cache: a sequence keeps its row while the batch composition changes around it. Absent, batch row b uses cache row b. Every entry must lie in `[0, max_seqs)` and no two rows may share one (each rejects). On that cache `kvcache_start` stays the rank-1 `[B]` layout selector whose values are not read: each row's write offset is `cu_seqlens_k[b] - q_len[b]`. A paged block table and the dense in-place form take no `slot_ids` (the block table is its own row map; the dense form addresses rows by batch index). A paged block table (`[B, max_blocks]` Int32) is validated whole before any read: every entry is `-1` (the unused-tail pad) or a block index in `[0, num_blocks)`, and no two entries of one row name the same physical block; an out-of-range entry and a repeated one alike refuse `INVALID_ARGUMENT` (a repeat would alias two positions onto one block and decode wrong values silently). A read-only attend (`key` and `value` absent) takes no present outputs: use [`attention_over_cache`](./attention_over_cache.md#attention_over_cache), or leave `out_present_key`/`out_present_value` unbound, and `present_key`/`present_value` come back undefined. A bound present refuses `INVALID_ARGUMENT`. `kept_prefix` keeps each sequence's first P keys attended beside the sliding window (a 0-D value for every sequence, or `[B]` one per sequence; Int32 or Int64): under the causal bound a key is attended when it is inside the first P keys or inside the window; absent, the window alone. A negative P refuses. \{out\_attn, present\_key, present\_value\}. |
| [`group_query_attention_varlen`](./group_query_attention_varlen.md) | The varlen variant of the fused GQA above, with the same qk-norm tail: `q_norm_gain`/`k_norm_gain` (rank-1 `[head_dim]`, post-rope, applied before the K/V append) travel with `qk_norm_eps` (the model's rms-norm epsilon) and require the in-op rope planes; absent ⇒ unchanged. The gains are the after-rotation order; a model that norms its heads before the rotation (the Qwen3 order) runs [`qk_rms_norm`](./qk_rms_norm.md#qk_rms_norm) on its projections ahead of this op and passes no gains. The same `slot_ids` contract: on a continuous cache it names each batch row's cache row (`[B]` Int32, in range, pairwise distinct; absent = row b for batch row b), and `kvcache_start`'s values stay unread there (the write offsets derive from `cu_seqlens_k`). The same block-table contract on a paged pool: every entry of the `[B, max_blocks]` table is `-1` or a block index in `[0, num_blocks)`, and no two entries of one row name the same physical block; an out-of-range or repeated entry refuses `INVALID_ARGUMENT` before any read or append. The same read-only rule: with `key` and `value` absent it takes no present outputs; use [`attention_over_cache`](./attention_over_cache.md#attention_over_cache), or leave `out_present_key`/`out_present_value` unbound. `kept_prefix` keeps each request's first P keys attended beside the sliding window (a 0-D value or `[B]`, Int32 or Int64), the same law as [`attention`](./attention.md#attention)'s. `kv_position_offset` (`[B]`, Int32 or Int64) is each paged row's served-key offset: when a windowed paged cache serves only a row's recent blocks, its served key at view position i sits at absolute position i + offset, so the in-op rotary and the window read true positions; pass `KVCache::StepIndices::kv_position_offset` through as-is (undefined on every other cache). |
| [`gt`](./gt.md) | Elementwise `a > other`; output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`gt_`](./gt_.md) | In-place [`gt`](./gt.md#gt): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`hardshrink`](./hardshrink.md) | Hard shrinkage: zeroes every element within `[-lambd, lambd]`. |
| [`hardshrink_`](./hardshrink_.md) | In-place [`hardshrink`](./hardshrink.md#hardshrink): writes the result through `self`; same formula, arguments, and error conditions as [`hardshrink()`](./hardshrink.md#hardshrink). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`hardsigmoid`](./hardsigmoid.md) | Piecewise-linear sigmoid approximation. |
| [`hardsigmoid_`](./hardsigmoid_.md) | In-place [`hardsigmoid`](./hardsigmoid.md#hardsigmoid): writes the result through `self`; same formula, arguments, and error conditions as [`hardsigmoid()`](./hardsigmoid.md#hardsigmoid). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`hardswish`](./hardswish.md) | Piecewise-linear swish approximation (the MobileNet-v3 form). |
| [`hardswish_`](./hardswish_.md) | In-place [`hardswish`](./hardswish.md#hardswish): writes the result through `self`; same formula, arguments, and error conditions as [`hardswish()`](./hardswish.md#hardswish). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`hardtanh`](./hardtanh.md) | Clamps every element to `[min_val, max_val]`. |
| [`hardtanh_`](./hardtanh_.md) | In-place [`hardtanh`](./hardtanh.md#hardtanh): writes the result through `self`; same formula, arguments, and error conditions as [`hardtanh()`](./hardtanh.md#hardtanh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`hash_128`](./hash_128.md) | 128-bit sibling of [`hash_64`](./hash_64.md#hash_64); same byte/portability contract. \[2\] UInt64 (little-endian limb order). ClikaRT::Error when the input's dtype is not served for this operation (the machine-readable reason rides code\_name()). |
| [`hash_256`](./hash_256.md) | 256-bit sibling of [`hash_64`](./hash_64.md#hash_64); same byte/portability contract. \[4\] UInt64 (little-endian limb order). ClikaRT::Error when the input's dtype is not served for this operation (the machine-readable reason rides code\_name()). |
| [`hash_64`](./hash_64.md) | 64-bit content hash of `input`'s packed bytes (row-major logical order; strided inputs are materialized internally). A frozen function of (seed, bytes): identical on every platform, backend, and ISA tier, so digests are safe to persist and compare across devices. `seed` perturbs the key; 0 selects the runtime's fixed content-addressing key. |
| [`hash_chain`](./hash_chain.md) | Rowwise 128-bit CHAINED hash: for `rows [N, ..]` and a `[2]` UInt64 `parent` (zeros = the chain's zero element), row `i`'s digest hashes (digest `i-1` ‖ row `i`'s packed bytes); one dispatch computes a whole sequence's rolling content hashes. Same portability contract as [`hash_64`](./hash_64.md#hash_64). |
| [`hash_lanes`](./hash_lanes.md) | Elementwise per-lane BIJECTIVE hash, shape-preserving: every lane of an integer `input` maps through a permutation of its width, so distinct lane values stay distinct (a lane-wise content id, a bucket index, a deterministic shuffle key). A 32-bit lane lands as UInt32, a 64-bit lane as UInt64; `algo` selects the permutation within the input's width ([`HashLaneAlgo::Auto`](./index.md#HashLaneAlgo): `Triple32` for 32-bit lanes, `Moremur` for 64-bit ones). `key` perturbs the permutation (0 is a fixed valid default, so the same key gives the same map on every platform and backend). `mask_bits` in `(0, width]` restricts the bijection to `[0, 2^mask_bits)`: a lane below that bound maps to a lane below it, so a table of that size is permuted onto itself; 0 (and the lane width) keeps the full width. |
| [`hash_tensor`](./hash_tensor.md) | Bitwise hash-reduction over `dims` (empty = all): each element's bits are mixed and combined per `mode` into a UInt64 digest, standard reduction shape. Order-independent under [`HashTensorMode::XorSum`](./index.md#HashTensorMode), and identical on every backend, a cheap whole-tensor fingerprint for parity checks and cache keys. |
| [`histogram`](./histogram.md) | a 2-element array \{values, indices\}. |
| [`huber_loss`](./huber_loss.md) | Huber loss: quadratic near zero, linear past the `delta` knee. |
| [`hypot`](./hypot.md) | Elementwise hypotenuse $\sqrt{a^2 + b^2}$. Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped result at the promoted float dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`hypot_`](./hypot_.md) | In-place [`hypot`](./hypot.md#hypot): writes the hypotenuses through `x`. ClikaRT::Error as the value form. |
| [`index`](./index-fn.md) | Advanced indexing over the standard entry vocabulary (int / bool / integer-or-boolean [Tensor](../Tensor.md) / [`IndexSlice`](./IndexSlice.md) / [`ellipsis`](./index.md#ellipsis) / [`new_axis`](./index.md#new_axis)): [`index`](./index-fn.md#index)`(t, {1, `[`slice_all`](./index.md#slice_all)`, idx})` ≡ `t[1, :, idx]`. |
| [`index_add`](./index_add.md) | A copy of `input` with rows of `src` ACCUMULATED at `indices` along `dim`: `out[.., indices[i], ..] += src[.., i, ..]`; duplicate indices add up. |
| [`index_add_`](./index_add_.md) | In-place [`index_add`](./index_add.md#index_add): `self[.., indices[i], ..] += src[.., i, ..]`; same arguments and error conditions as [`index_add()`](./index_add.md#index_add). Accumulates through `self`'s storage (a strided view reaches its base buffer; aliases observe the write). Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`index_copy`](./index_copy.md) | A copy of `input` with rows of `src` WRITTEN at `indices` along `dim`: `out[.., indices[i], ..] = src[.., i, ..]`. Prefer unique indices; a duplicated position is written more than once. |
| [`index_copy_`](./index_copy_.md) | In-place [`index_copy`](./index_copy.md#index_copy): `self[.., indices[i], ..] = src[.., i, ..]`; same arguments and error conditions as [`index_copy()`](./index_copy.md#index_copy). Writes through `self`'s storage (a strided view, e.g. a cache slice, reaches its base buffer; aliases observe the write). Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`index_fill`](./index_fill.md) | A copy of `input` with the rows at `indices` along `dim` set to `value`: `out[.., indices[i], ..] = value`. |
| [`index_fill_`](./index_fill_.md) | In-place [`index_fill`](./index_fill.md#index_fill): `self[.., indices[i], ..] = value`; same arguments and error conditions as [`index_fill()`](./index_fill.md#index_fill). Fills through `self`'s storage (a strided view reaches its base buffer; aliases observe the write). Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`index_put`](./index_put.md) | A copy of `input` with `value` written (or accumulated) at the indexed positions, the out-of-place `input[indices] = value`. |
| [`index_put_`](./index_put_.md) | In-place `self[indices] = value` (or `+=` with `accumulate`); returns the mutated self so it chains. |
| [`index_select`](./index_select.md) | Select whole rows of `input` at [`index`](./index-fn.md#index) positions along `dim`. |
| [`inner`](./inner.md) | Last-axis contraction of two tensors. |
| [`instance_norm`](./instance_norm.md) | Instance normalization: statistics per `(sample, channel)` over the spatial dims (channels-last). |
| [`interpolate`](./interpolate.md) | Resample the spatial dims to `sizes` OR by `scale_factors` (exactly one given; entries may be int literals or 0-D Tensors, so a dynamic output size flows without a host read). Rank picks the spatial variant. |
| [`isclose`](./isclose.md) | Elementwise approximate equality, the elementwise map behind [`ops::allclose`](./allclose.md#allclose), same formula and defaults (`rtol` `1e-5`, `atol` `1e-8`, `equal_nan` `false`). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`isfinite`](./isfinite.md) | Elementwise finiteness test (neither infinite nor NaN); output as [`eq`](./eq.md#eq). Integer inputs are finite everywhere. input-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`isinf`](./isinf.md) | Elementwise infinity test (either sign); output as [`eq`](./eq.md#eq). input-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`isnan`](./isnan.md) | Elementwise NaN test; output as [`eq`](./eq.md#eq). input-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`isneginf`](./isneginf.md) | Elementwise `-inf` test; output as [`eq`](./eq.md#eq). input-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`isposinf`](./isposinf.md) | Elementwise `+inf` test; output as [`eq`](./eq.md#eq). input-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`kl_div`](./kl_div.md) | Kullback–Leibler divergence loss. |
| [`kron`](./kron.md) | Kronecker product of two same-rank tensors. |
| [`kthvalue`](./kthvalue.md) | a 2-element array \{values, indices\}. |
| [`l1_loss`](./l1_loss.md) | Mean-absolute-error loss between `input` and `target`. |
| [`layer_norm`](./layer_norm.md) | Layer normalization over the trailing `normalized_shape` dims of `input`. |
| [`le`](./le.md) | Elementwise `a <= other`; output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`le_`](./le_.md) | In-place [`le`](./le.md#le): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`leaky_relu`](./leaky_relu.md) | ReLU with a small slope on the negative side. |
| [`leaky_relu_`](./leaky_relu_.md) | In-place [`leaky_relu`](./leaky_relu.md#leaky_relu): writes the result through `self`; same formula, arguments, and error conditions as [`leaky_relu()`](./leaky_relu.md#leaky_relu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`linear`](./linear.md) | `x @ weightᵀ (+ bias)`; `weight` in the `[out, in]` Linear layout. Same situ contract as [`matmul`](./matmul.md#matmul): [`Activation::Situ`](./index.md#Activation) transforms both halves of the gate‖up projection under the two soft-caps (`situ_beta` = β, `situ_linear_beta` = lβ, both \> 0, from the model's config); either scalar with any other activation rejects. |
| [`linspace`](./linspace.md) | `steps` evenly spaced values from `start` to `end`, ENDPOINTS INCLUDED. |
| [`log`](./log.md) | Elementwise natural logarithm. |
| [`log10`](./log10.md) | Elementwise base-10 logarithm. |
| [`log10_`](./log10_.md) | In-place [`log10`](./log10.md#log10): writes the result through `self`; same formula, arguments, and error conditions as [`log10()`](./log10.md#log10). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`log1p`](./log1p.md) | Elementwise [`log`](./log.md#log)`(1 + x)`, accurate for small `input`. |
| [`log1p_`](./log1p_.md) | In-place [`log1p`](./log1p.md#log1p): writes the result through `self`; same formula, arguments, and error conditions as [`log1p()`](./log1p.md#log1p). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`log2`](./log2.md) | Elementwise base-2 logarithm. |
| [`log2_`](./log2_.md) | In-place [`log2`](./log2.md#log2): writes the result through `self`; same formula, arguments, and error conditions as [`log2()`](./log2.md#log2). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`log_`](./log_.md) | In-place [`log`](./log.md#log): writes the result through `self`; same formula, arguments, and error conditions as [`log()`](./log.md#log). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`log_sigmoid`](./log_sigmoid.md) | Logarithm of the sigmoid, computed stably. |
| [`log_sigmoid_`](./log_sigmoid_.md) | In-place [`log_sigmoid`](./log_sigmoid.md#log_sigmoid): writes the result through `self`; same formula, arguments, and error conditions as [`log_sigmoid()`](./log_sigmoid.md#log_sigmoid). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`log_softmax`](./log_softmax.md) | Logarithm of the softmax along `dim`, computed stably (never `log(softmax(x))` in two passes). |
| [`log_softmax_`](./log_softmax_.md) | In-place [`log_softmax`](./log_softmax.md#log_softmax): writes the result through `self`; same formula, arguments, and error conditions as [`log_softmax()`](./log_softmax.md#log_softmax). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`logaddexp`](./logaddexp.md) | Elementwise $\log(e^a + e^b)$, computed overflow-safely (the log-domain accumulation primitive). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped result at the promoted float dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`logaddexp2`](./logaddexp2.md) | Elementwise $\log_2(2^a + 2^b)$, [`logaddexp`](./logaddexp.md#logaddexp) in base 2. Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped result at the promoted float dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`logical_and`](./logical_and.md) | Elementwise logical AND; non-Bool inputs read as `element != 0` before the logic, and the output is always `Bool` (output as [`eq`](./eq.md#eq)). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`logical_and_`](./logical_and_.md) | In-place [`logical_and`](./logical_and.md#logical_and): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`logical_not`](./logical_not.md) | Elementwise logical NOT (`element == 0`); output as [`eq`](./eq.md#eq). input-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`logical_not_`](./logical_not_.md) | In-place [`logical_not`](./logical_not.md#logical_not): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`logical_or`](./logical_or.md) | Elementwise logical OR (non-Bool inputs read as `!= 0`); output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`logical_or_`](./logical_or_.md) | In-place [`logical_or`](./logical_or.md#logical_or): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`logical_xor`](./logical_xor.md) | Elementwise logical XOR (non-Bool inputs read as `!= 0`); output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`logical_xor_`](./logical_xor_.md) | In-place [`logical_xor`](./logical_xor.md#logical_xor): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`logit`](./logit.md) | Elementwise log-odds. |
| [`logit_`](./logit_.md) | In-place [`logit`](./logit.md#logit): writes the result through `self`; same formula, arguments, and error conditions as [`logit()`](./logit.md#logit). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`logsumexp`](./logsumexp.md) | Numerically stable [`log`](./log.md#log)`(sum(exp(x)))` over `dims`. |
| [`lt`](./lt.md) | Elementwise `a < other`; output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`lt_`](./lt_.md) | In-place [`lt`](./lt.md#lt): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`masked_fill`](./masked_fill.md) | Replace the elements of `input` where `mask` is true with `value`. |
| [`masked_fill_`](./masked_fill_.md) | In-place [`masked_fill`](./masked_fill.md#masked_fill): writes `value` through `self` where `mask` is true; same arguments and error conditions as [`masked_fill()`](./masked_fill.md#masked_fill). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`masked_scatter`](./masked_scatter.md) | A copy of `input` with the leading `count(mask)` elements of `src` (read row-major) written at the positions where `mask` is true. |
| [`masked_scatter_`](./masked_scatter_.md) | In-place [`masked_scatter`](./masked_scatter.md#masked_scatter): writes `src`'s leading elements through `self` where `mask` is true; same arguments and error conditions as [`masked_scatter()`](./masked_scatter.md#masked_scatter). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`masked_select`](./masked_select.md) | The elements of `input` where `mask` is true, as a 1-D tensor. |
| [`matmul`](./matmul.md) | `a @ b (+ bias)` with an optional fused activation epilogue. A gated `activation` (`SwiGlu`/`GeGlu`/`ReGlu`/`Situ`) takes the product as a concatenated `[*, 2d]` gate‖up projection and emits `[*, d]` in one pass. `situ_beta`/`situ_linear_beta` are [`Activation::Situ`](./index.md#Activation)'s two soft-cap scalars (β and lβ in `β·tanh(gate/β)·sigmoid(gate) · lβ·tanh(up/lβ)`); pass the model's own config values. `Situ` requires BOTH \> 0, and either scalar with any other activation rejects (it would otherwise be silently ignored). The transform computes at fp32 end-to-end with one demote at the store for f16/bf16 outputs. |
| [`max`](./max.md) | a 2-element array \{values, indices\}. |
| [`max_pool`](./max_pool.md) | Rank-generic max pooling, channels-last. |
| [`max_pool1d`](./max_pool1d.md) | 1-D max pooling over `[N, L, C]` (channels-last). See [`max_pool`](./max_pool.md#max_pool) for the window semantics; `stride` empty = `kernel_size`. |
| [`max_pool1d_with_indices`](./max_pool1d_with_indices.md) | a 2-element array \{values, indices\}. See max\_pool\_with\_indices for the index rule. |
| [`max_pool2d`](./max_pool2d.md) | 2-D max pooling over `[N, H, W, C]` (channels-last). |
| [`max_pool2d_with_indices`](./max_pool2d_with_indices.md) | a 2-element array \{values, indices\}. See max\_pool\_with\_indices for the index rule. |
| [`max_pool3d`](./max_pool3d.md) | 3-D max pooling over `[N, D, H, W, C]` (channels-last). See [`max_pool2d`](./max_pool2d.md#max_pool2d); parameters extend to `{kD, kH, kW}` etc. |
| [`max_pool3d_with_indices`](./max_pool3d_with_indices.md) | a 2-element array \{values, indices\}. See max\_pool\_with\_indices for the index rule. |
| [`max_pool_with_indices`](./max_pool_with_indices.md) | Max pooling that also returns each window's winning element as a flat index over the input's spatial extents (per plane, the same for every channel). The values follow [`max_pool`](./max_pool.md#max_pool). The index names the window's lowest-index NaN element when it holds one, else the first element holding the max (a tie keeps the lowest index); a window lying wholly in the padding reports -1. |
| [`maximum`](./maximum.md) | Elementwise maximum, NaN-PROPAGATING: a NaN in either operand yields NaN (use [`ops::fmax`](./fmax.md#fmax) for the NaN-ignoring IEEE law). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped maxima. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`maximum_`](./maximum_.md) | In-place [`maximum`](./maximum.md#maximum): writes the elementwise maxima through `x`. ClikaRT::Error as the value form. |
| [`mean`](./mean.md) | Arithmetic mean of `input` over `dims`. |
| [`median`](./median.md) | a 2-element array \{values, indices\}. |
| [`meshgrid`](./meshgrid.md) | Coordinate grids from 1-D axes: N inputs produce N N-D tensors, each input broadcast over every other axis, the NumPy [`meshgrid`](./meshgrid.md#meshgrid). |
| [`min`](./min.md) | a 2-element array \{values, indices\}. |
| [`minimum`](./minimum.md) | Elementwise minimum, NaN-PROPAGATING (the [`maximum`](./maximum.md#maximum) dual; use [`ops::fmin`](./fmin.md#fmin) for NaN-ignoring). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped minima. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`minimum_`](./minimum_.md) | In-place [`minimum`](./minimum.md#minimum): writes the elementwise minima through `x`. ClikaRT::Error as the value form. |
| [`mish`](./mish.md) | Mish activation. |
| [`mish_`](./mish_.md) | In-place [`mish`](./mish.md#mish): writes the result through `self`; same formula, arguments, and error conditions as [`mish()`](./mish.md#mish). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`mla_attention`](./mla_attention.md) | Multi-head Latent Attention over a compressed KV cache, latent-space end to end: q\_nope `[ΣS, H, Dl]` (W\_UK-absorbed) + q\_pe `[ΣS, H, Dr]` score against the per-token compressed rows; the caches (`[max_seqs, max_seq, Dl/Dr]`) take this step's `new_ckv`/`new_kpe` appends IN PLACE (write offsets = `kvcache_start [B]` Int32; `cu_seqlens_q [B+1]` locates each sequence's packed tokens); the returned `[ΣS, H, Dl]` output stays latent (apply the W\_UV un-absorption after). `scale` is REQUIRED; the absorbed query's magnitude lives in the model's un-absorbed head dim. |
| [`mm`](./mm.md) | Matrix multiply of two rank-2 tensors, with an optional fused bias and activation epilogue. |
| [`mod`](./mod.md) | Elementwise modulo with a selectable sign convention. |
| [`mod_`](./mod_.md) | In-place [`mod`](./mod.md#mod): writes the remainders through `x`. ClikaRT::Error as the value form. |
| [`moe`](./moe.md) | Fused Mixture-of-Experts layer: route, run the top-k experts, combine in one call, with no per-expert dispatch from the caller. |
| [`mrope_rotary_embedding`](./mrope_rotary_embedding.md) | Multi-section rotary position embedding over padded layouts. |
| [`mrope_rotary_embedding_qk_varlen`](./mrope_rotary_embedding_qk_varlen.md) | Multi-axis RoPE over a packed q/k pair: ONE per-token angle table serves both projections in a single call, the media-prefill pre-rotation shape. `query`/`key` are head-exposed `[n_tokens, heads, head_dim]` (a flat `[n_tokens, heads·head_dim]` projection reshapes to it as a free view; the rotation spans the TRAILING dim, so a flat row would rotate across head boundaries); `position_ids` is `[n_axes, n_tokens]` with `n_axes == mrope_sections.size()` (strip any trailing zero sections a checkpoint's metadata pads; the axis count follows the section list); `rotary_dim` bounds the rotated span (dims beyond it pass through) and defaults to the trailing dim. Rows whose per-axis positions are all EQUAL rotate exactly as the plain ops do; serve pure-text calls through `rotary_embedding*` (cheaper: no per-token table), and use this form for packs whose rows carry genuinely multi-axis positions, then attend with the rope inputs ABSENT so the attention op consumes (and appends) q/k exactly as given. a 2-element array \{q, k\}. |
| [`mrope_rotary_embedding_varlen`](./mrope_rotary_embedding_varlen.md) | Multi-section rotary position embedding over token-packed layouts (`cu_seqlens` `[B+1]` Int32, as in [`rotary_embedding_varlen`](./rotary_embedding_varlen.md#rotary_embedding_varlen)). |
| [`ms_deform_attention`](./ms_deform_attention.md) | Multi-scale deformable attention (2-D): per query and head, gather `P` bilinear samples from each of `L` flattened feature-map levels and combine them with the given weights. `value [N, S, M, D]` with `S = Σ_l H_l·W_l`; `spatial_shapes [L, 2]` = per-level `(H_l, W_l)` and `level_start_index [L]` (both Int32 or Int64); `sampling_locations [N, Lq, M, L, P, 2]`; last dim `(x, y)`, normalized to `[0, 1]` per level, sampled at `loc·size − 0.5` (bilinear; out-of-bounds reads 0); `attention_weights [N, Lq, M, L, P]` are consumed AS GIVEN (apply softmax beforehand if wanted). Returns `[N, Lq, M, D]` at `value`'s dtype; accumulation is fp32. The float inputs must share `value`'s dtype (f32/f64/f16/bf16; no silent promotion). |
| [`mse_loss`](./mse_loss.md) | Mean-squared-error loss between `input` and `target`. |
| [`mul`](./mul.md) <small>(2 overloads)</small> | Multiplies `input` by `other` elementwise. |
| [`mul_`](./mul_.md) | In-place [`mul`](./mul.md#mul): writes $act(x \cdot other)$ through `x`. ClikaRT::Error as the value form. |
| [`multinomial`](./multinomial.md) | Categorical sampling: draws `num_samples` category indices per row of a weight tensor. |
| [`mv`](./mv.md) | Matrix-vector multiply, with an optional fused bias and activation. |
| [`nan_to_num`](./nan_to_num.md) | Replaces NaN and infinities with finite values. |
| [`nan_to_num_`](./nan_to_num_.md) | In-place [`nan_to_num`](./nan_to_num.md#nan_to_num): writes the result through `self`; same formula, arguments, and error conditions as [`nan_to_num()`](./nan_to_num.md#nan_to_num). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`nanmean`](./nanmean.md) | Mean over `dims`, treating NaN entries as missing. |
| [`nanmedian`](./nanmedian.md) | a 2-element array \{values, indices\}. |
| [`nanquantile`](./nanquantile.md) | [`quantile`](./quantile.md#quantile) that treats NaN entries as missing; each slice's quantile is computed over its non-NaN values (an all-NaN slice yields NaN). Parameters and shapes as [`quantile`](./quantile.md#quantile). |
| [`nansum`](./nansum.md) | Sum over `dims`, treating NaN entries as missing (contributing zero). |
| [`narrow`](./narrow.md) | `length` elements from `start` along `dim`. Both are int literals or 0-D integer Tensors (a tensor-valued window never syncs to the host). |
| [`ndim`](./ndim.md) | The tensor's rank as a 0-D Int64 tensor. |
| [`ndim_host`](./ndim_host.md) | The rank as a 0-D Int64 HOST tensor, written from metadata; the same no-sync contract as [`shape_host`](./shape_host.md#shape_host). |
| [`ne`](./ne.md) | Elementwise `a != other`; output as [`eq`](./eq.md#eq). the broadcast-shaped Bool mask. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`ne_`](./ne_.md) | In-place [`ne`](./ne.md#ne): writes the result through `x` (one/zero at `x`'s dtype). ClikaRT::Error as the value form. |
| [`neg`](./neg.md) | Elementwise negation. |
| [`neg_`](./neg_.md) | In-place [`neg`](./neg.md#neg): writes the result through `self`; same formula, arguments, and error conditions as [`neg()`](./neg.md#neg). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`nll_loss`](./nll_loss.md) | Negative-log-likelihood loss over LOG-probabilities; class dim LAST. |
| [`nms`](./nms.md) | Batched, class-aware non-max suppression (argument order mirrors the ONNX operator). `boxes` is `[batch, num_boxes, 4]`; `scores` is `[batch, classes, num_boxes]`; returns the selected indices as an Int64 `[num_selected, 3]` of `(batch, class, box)` rows. Every threshold takes a literal OR a 0-D tensor (a tensor traces symbolically). An absent `max_output_boxes_per_class` selects NOTHING (the reference default); a negative cap clamps to 0. A literal `iou_threshold` outside \[0, 1\] raises. `center_point_box` picks the `[cx, cy, w, h]` box encoding over the corners form. |
| [`nonzero`](./nonzero.md) | Coordinates of the nonzero elements: an `[n, `[`ndim`](./ndim.md#ndim)`]` Int64 matrix, one row per nonzero element of `input`. 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. |
| [`norm`](./norm.md) | The `p`-norm of `input` over `dims`. |
| [`normal`](./normal.md) | Normal draws with the given mean and standard deviation. |
| [`normal_`](./normal_.md) | In-place normal fill: overwrites `self` with `N(mean, stddev^2)` draws at `self`'s shape/dtype and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. ClikaRT::Error as normal. |
| [`normalize`](./normalize.md) | L\_p-normalizes `input` along `dim`: each slice is scaled to unit `p`-norm. |
| [`normalize_`](./normalize_.md) | In-place [`normalize`](./normalize.md#normalize): rewrites `self` with its L\_p-normalized value and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. ClikaRT::Error as normalize. |
| [`numel`](./numel.md) | The tensor's total element count as a 0-D Int64 tensor. |
| [`numel_host`](./numel_host.md) | The element count as a 0-D Int64 HOST tensor, written from metadata; the same no-sync contract as [`shape_host`](./shape_host.md#shape_host). Composes with shape-consuming arguments, e.g. [`reshape`](./reshape.md#reshape)`(x, {numel_host(x)})` flattens without reading sizes to the host. |
| [`one_hot`](./one_hot.md) | Expands an integer index tensor into a trailing one-hot dimension. |
| [`ones`](./ones.md) | A new tensor of the given shape with every element set to one. |
| [`ones_like`](./ones_like.md) | A one-filled tensor with `reference`'s shape and dtype (data never read); [`device`](../device-namespace/index.md) absent = the reference's own device. |
| [`outer`](./outer.md) | Outer product of two 1-D tensors: `[m] x [n] -> [m, n]`. |
| [`pad`](./pad.md) | Pad each axis by interleaved `(lo, hi)` pairs in layout order, left-to-right: pair `i` pads axis `i` (the first pair is the leading axis). Provide fewer pairs than the rank to pad only the leading axes; a negative width crops that side. `mode` selects the fill; `value` is the Constant fill (default 0). |
| [`pairwise_distance`](./pairwise_distance.md) | Row-wise L\_p distance between two batched vectors. |
| [`pdist`](./pdist.md) | Condensed pairwise L\_p distances within ONE 2-D input. |
| [`permute`](./permute.md) | Reorder the dims by `dims`, a permutation of `[0, rank)`. |
| [`pixel_shuffle`](./pixel_shuffle.md) | Rearranges channels into space (depth-to-space): channels-last `[N, H, W, C]` becomes `[N, H*r, W*r, C/r^2]`. |
| [`pixel_unshuffle`](./pixel_unshuffle.md) | The inverse of [`pixel_shuffle`](./pixel_shuffle.md#pixel_shuffle) (space-to-depth): channels-last `[N, H, W, C]` becomes `[N, H/r, W/r, C*r^2]`. |
| [`poisson`](./poisson.md) | Independent Poisson draws from per-element rates. |
| [`pow`](./pow.md) | Raises `input` to `exponent` elementwise: $a^{exponent}$. Broadcasts and promotes as [`add`](./add.md#add); a scalar `exponent` keeps its weak kind (an integer exponent with an integer base stays integral). the broadcast-shaped powers at the promoted dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`pow_`](./pow_.md) | In-place [`pow`](./pow.md#pow): writes the powers through `x`. ClikaRT::Error as the value form. |
| [`prelu`](./prelu.md) | Parametric ReLU: a learned negative-side slope. |
| [`prelu_`](./prelu_.md) | In-place [`prelu`](./prelu.md#prelu): writes the result through `self`; same formula, arguments, and error conditions as [`prelu()`](./prelu.md#prelu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`prod`](./prod.md) | Product of `input`'s elements over `dims`. |
| [`put`](./put.md) | A copy of `input` with `source` written at FLAT (row-major linearized) positions: `out.flat[`[`index`](./index-fn.md#index)`[i]] = source.flat[i]`. |
| [`put_`](./put_.md) | In-place [`put`](./put.md#put): writes (or accumulates) through `self` at flat positions; same arguments and error conditions as [`put()`](./put.md#put). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`q_embedding`](./q_embedding.md) |  |
| [`qadd`](./qadd.md) <small>(2 overloads)</small> |  |
| [`qadd_`](./qadd_.md) <small>(3 overloads)</small> |  |
| [`qconcat`](./qconcat.md) <small>(2 overloads)</small> |  |
| [`qconcat_`](./qconcat_.md) <small>(2 overloads)</small> |  |
| [`qconv`](./qconv.md) <small>(2 overloads)</small> |  |
| [`qconv1d`](./qconv1d.md) <small>(2 overloads)</small> |  |
| [`qconv1d_woq`](./qconv1d_woq.md) |  |
| [`qconv2d`](./qconv2d.md) <small>(2 overloads)</small> |  |
| [`qconv2d_woq`](./qconv2d_woq.md) |  |
| [`qconv3d`](./qconv3d.md) <small>(2 overloads)</small> |  |
| [`qconv3d_woq`](./qconv3d_woq.md) |  |
| [`qconv_`](./qconv_.md) <small>(3 overloads)</small> |  |
| [`qconv_transpose`](./qconv_transpose.md) <small>(2 overloads)</small> |  |
| [`qconv_transpose1d`](./qconv_transpose1d.md) <small>(2 overloads)</small> |  |
| [`qconv_transpose1d_woq`](./qconv_transpose1d_woq.md) |  |
| [`qconv_transpose2d`](./qconv_transpose2d.md) <small>(2 overloads)</small> |  |
| [`qconv_transpose2d_woq`](./qconv_transpose2d_woq.md) |  |
| [`qconv_transpose3d`](./qconv_transpose3d.md) <small>(2 overloads)</small> |  |
| [`qconv_transpose3d_woq`](./qconv_transpose3d_woq.md) |  |
| [`qconv_transpose_`](./qconv_transpose_.md) <small>(3 overloads)</small> |  |
| [`qconv_transpose_woq`](./qconv_transpose_woq.md) |  |
| [`qconv_woq`](./qconv_woq.md) |  |
| [`qdeform_conv`](./qdeform_conv.md) <small>(2 overloads)</small> |  |
| [`qdeform_conv_woq`](./qdeform_conv_woq.md) |  |
| [`qdiv`](./qdiv.md) <small>(2 overloads)</small> |  |
| [`qdiv_`](./qdiv_.md) <small>(3 overloads)</small> |  |
| [`qfast_gelu`](./qfast_gelu.md) <small>(2 overloads)</small> |  |
| [`qfast_gelu_`](./qfast_gelu_.md) <small>(3 overloads)</small> |  |
| [`qgelu`](./qgelu.md) <small>(2 overloads)</small> |  |
| [`qgelu_`](./qgelu_.md) <small>(3 overloads)</small> |  |
| [`qhardsigmoid`](./qhardsigmoid.md) <small>(2 overloads)</small> |  |
| [`qhardsigmoid_`](./qhardsigmoid_.md) <small>(3 overloads)</small> |  |
| [`qhardswish`](./qhardswish.md) <small>(2 overloads)</small> |  |
| [`qhardswish_`](./qhardswish_.md) <small>(3 overloads)</small> |  |
| [`qk_layer_norm`](./qk_layer_norm.md) | Per-head LAYER norm over packed attention projections, the mean-subtracting sibling of [`qk_rms_norm`](./qk_rms_norm.md#qk_rms_norm). |
| [`qk_layer_norm_`](./qk_layer_norm_.md) | In-place [`qk_layer_norm`](./qk_layer_norm.md#qk_layer_norm): normalizes `query` (and `key` and `value`, when given) through their own storage (no output allocation). `key` and `value` are optional operands written through: pass a pointer to your tensor, or `nullptr` for absent. Every written-through handle is rebound to the op's output, so under a [`TracingScope`](../TracingScope.md) the caller's `key` becomes the traced output exactly as `query` does. Otherwise the same arguments and error conditions as [`qk_layer_norm()`](./qk_layer_norm.md#qk_layer_norm). Returns `query` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`qk_rms_norm`](./qk_rms_norm.md) | Per-head RMS norm over packed attention projections: query, key and value in ONE call, no reshapes. |
| [`qk_rms_norm_`](./qk_rms_norm_.md) | In-place [`qk_rms_norm`](./qk_rms_norm.md#qk_rms_norm): normalizes `query` (and `key` and `value`, when given) through their own storage (no output allocation). `key` and `value` are optional operands written through: pass a pointer to your tensor, or `nullptr` for absent. Every written-through handle is rebound to the op's output, so under a [`TracingScope`](../TracingScope.md) the caller's `key` becomes the traced output exactly as `query` does. Otherwise the same arguments and error conditions as [`qk_rms_norm()`](./qk_rms_norm.md#qk_rms_norm). Returns `query` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`qleaky_relu`](./qleaky_relu.md) <small>(2 overloads)</small> |  |
| [`qleaky_relu_`](./qleaky_relu_.md) <small>(3 overloads)</small> |  |
| [`qlinear`](./qlinear.md) <small>(2 overloads)</small> |  |
| [`qlinear_`](./qlinear_.md) <small>(2 overloads)</small> |  |
| [`qlinear_woq`](./qlinear_woq.md) |  |
| [`qlinear_woq_`](./qlinear_woq_.md) |  |
| [`qmatmul`](./qmatmul.md) <small>(2 overloads)</small> |  |
| [`qmatmul_`](./qmatmul_.md) <small>(3 overloads)</small> |  |
| [`qmatmul_woq`](./qmatmul_woq.md) |  |
| [`qmatmul_woq_`](./qmatmul_woq_.md) |  |
| [`qmoe`](./qmoe.md) <small>(2 overloads)</small> |  |
| [`qmoe_woq`](./qmoe_woq.md) |  |
| [`qmul`](./qmul.md) <small>(2 overloads)</small> |  |
| [`qmul_`](./qmul_.md) <small>(3 overloads)</small> |  |
| [`qneg`](./qneg.md) <small>(2 overloads)</small> |  |
| [`qneg_`](./qneg_.md) <small>(3 overloads)</small> |  |
| [`qquick_gelu`](./qquick_gelu.md) <small>(2 overloads)</small> |  |
| [`qquick_gelu_`](./qquick_gelu_.md) <small>(3 overloads)</small> |  |
| [`qrelu`](./qrelu.md) <small>(2 overloads)</small> |  |
| [`qrelu_`](./qrelu_.md) <small>(3 overloads)</small> |  |
| [`qsigmoid`](./qsigmoid.md) <small>(2 overloads)</small> |  |
| [`qsigmoid_`](./qsigmoid_.md) <small>(3 overloads)</small> |  |
| [`qsilu`](./qsilu.md) <small>(2 overloads)</small> |  |
| [`qsilu_`](./qsilu_.md) <small>(3 overloads)</small> |  |
| [`qsub`](./qsub.md) <small>(2 overloads)</small> |  |
| [`qsub_`](./qsub_.md) <small>(3 overloads)</small> |  |
| [`qtanh`](./qtanh.md) <small>(2 overloads)</small> |  |
| [`qtanh_`](./qtanh_.md) <small>(3 overloads)</small> |  |
| [`quantile`](./quantile.md) | The `q`-th quantile of `input` along `dim`. |
| [`quantize`](./quantize.md) |  |
| [`quantize_`](./quantize_.md) <small>(2 overloads)</small> |  |
| [`quantize_dequantize`](./quantize_dequantize.md) |  |
| [`quantize_to_scheme`](./quantize_to_scheme.md) |  |
| [`quick_gelu`](./quick_gelu.md) | QuickGELU: the sigmoid GELU approximation. |
| [`rad2deg`](./rad2deg.md) | Converts radians to degrees elementwise: $x \cdot 180 / \pi$. input's shape at its (float-promoted) dtype. ClikaRT::Error (INVALID\_ARGUMENT) for an unsupported dtype. |
| [`rad2deg_`](./rad2deg_.md) | In-place [`rad2deg`](./rad2deg.md#rad2deg): writes the degrees through `x`. ClikaRT::Error as the value form. |
| [`rand`](./rand.md) | Uniform random tensor on `[0, 1)`. |
| [`rand_like`](./rand_like.md) | Uniform `[0, 1)` draws shaped and typed like `reference`. |
| [`randint`](./randint.md) | Uniform random integers in the half-open range `[low, high)`. |
| [`randint_like`](./randint_like.md) | Uniform integers in `[low, high)` shaped and typed like `reference`. |
| [`randn`](./randn.md) | Standard-normal random tensor, `N(0, 1)`. |
| [`randn_like`](./randn_like.md) | `N(0, 1)` draws shaped and typed like `reference`. |
| [`random_`](./random_.md) | In-place uniform-INTEGER fill: overwrites `self` with draws from `[low, high)`. `low` and `high` come both or neither; with both absent, the range is the dtype's full representable-integer span. A view input writes through its base storage. Returns `self` for chaining. |
| [`randperm`](./randperm.md) | A random permutation of the integers `0 .. n-1`. |
| [`reciprocal`](./reciprocal.md) | Elementwise reciprocal. |
| [`reciprocal_`](./reciprocal_.md) | In-place [`reciprocal`](./reciprocal.md#reciprocal): writes the result through `self`; same formula, arguments, and error conditions as [`reciprocal()`](./reciprocal.md#reciprocal). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`reflect_pad`](./reflect_pad.md) | [`pad`](./pad.md#pad) in mirror mode: the padding reflects the tensor across each padded edge. Same `(lo, hi)` pair layout as [`constant_pad`](./constant_pad.md#constant_pad). Copies. |
| [`reglu`](./reglu.md) | ReGLU gated activation over a concatenated gate‖up input. |
| [`relu`](./relu.md) | Rectified linear unit. |
| [`relu6`](./relu6.md) | ReLU capped at 6. |
| [`relu6_`](./relu6_.md) | In-place [`relu6`](./relu6.md#relu6): writes the result through `self`; same formula, arguments, and error conditions as [`relu6()`](./relu6.md#relu6). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`relu_`](./relu_.md) | In-place [`relu`](./relu.md#relu): writes the result through `self`; same formula, arguments, and error conditions as [`relu()`](./relu.md#relu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`remainder`](./remainder.md) | Elementwise remainder with the sign of the DIVISOR, i.e. [`ops::mod`](./mod.md#mod) with [`ModMode::Python`](./index.md#ModMode). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped remainders. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`remainder_`](./remainder_.md) | In-place [`remainder`](./remainder.md#remainder): writes the remainders through `x`. ClikaRT::Error as the value form. |
| [`renorm`](./renorm.md) | Caps each sub-tensor's `p`-norm along `dim` at `maxnorm`. |
| [`renorm_`](./renorm_.md) | In-place [`renorm`](./renorm.md#renorm): rewrites `self` with each slice's norm capped at `maxnorm` and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. ClikaRT::Error as renorm. |
| [`repeat`](./repeat.md) | Tile `input` by per-dim repeat counts: `sizes[i]` copies along dim `i`. |
| [`repeat_interleave`](./repeat_interleave.md) | Repeat ELEMENTS, not blocks: each element along `dim` appears `repeats` times consecutively (`[a, b]` with repeats 2 -\> `[a, a, b, b]`). |
| [`replicate_pad`](./replicate_pad.md) | [`pad`](./pad.md#pad) in edge-replicate mode: the padding repeats each padded edge's value. Same `(lo, hi)` pair layout as [`constant_pad`](./constant_pad.md#constant_pad). Copies. |
| [`requantize`](./requantize.md) |  |
| [`requantize_`](./requantize_.md) <small>(2 overloads)</small> |  |
| [`resample`](./resample.md) | Audio-domain 1-D rational resample along the LAST axis: `[.., S]` at `orig_freq` → `[.., `[`ceil`](./ceil.md#ceil)`(S · L / M)]` at `new_freq`, where `L/M` is the gcd-reduced rate pair. A kaiser-windowed-sinc polyphase FIR, the standard antialiased sample-rate converter; input outside the signal reads as zero, and equal rates pass the signal through exactly. Leading axes are batch/channels (transpose another samples axis to the back first, a view). The defaults are the kaiser preset: `lowpass_filter_width` sinc zero-crossings per side, `rolloff` of the target Nyquist, and (when `beta` is absent) the design beta 14.769656459379492 (\~142.7 dB design stopband). Serves f32 natively and f16/bf16 through an f32 compute lane (output mirrors the input); integer and f64 signals refuse; cast to f32 first. CPU-served; device-resident inputs refuse until an accelerator kernel lands. |
| [`reshape`](./reshape.md) | Reshape to [`shape`](./shape.md#shape); one entry may be -1 to infer it from the element count. A dim entry is an int literal OR a 0-D/1-D integer [Tensor](../Tensor.md) ([`IndexBound`](./IndexBound.md)); e.g. [`reshape`](./reshape.md#reshape)`(x, {shape_host(x, 1), d})` composes without reading sizes to the host. |
| [`reshape_as`](./reshape_as.md) | Reshape `input` to `other`'s shape (`other` supplies extents only; its data is never read). The element counts must match. |
| [`rfft`](./rfft.md) | One-sided real FFT along the last axis: real `[..., n]` → interleaved (re, im) pairs `[..., n_fft/2 + 1, 2]`. `n_fft` defaults to the last axis's extent; `normalized` scales the spectrum by `1/sqrt(n_fft)`. |
| [`rms_norm`](./rms_norm.md) | Root-mean-square normalization over the trailing `normalized_shape` dims (no mean subtraction). |
| [`roll`](./roll.md) | Circularly shift elements: `shifts[i]` positions along `dims[i]`; elements that fall off one end re-enter at the other. |
| [`rot90`](./rot90.md) | Rotate the plane spanned by `dims` by `k` x 90 degrees (`k` is taken mod 4; odd rotations swap the two dims' extents). Default plane `{0, 1}`. Copies. |
| [`rotary_embedding`](./rotary_embedding.md) | Rotary position embedding over padded `[.., S, D]` layouts. |
| [`rotary_embedding_qk`](./rotary_embedding_qk.md) | a 2-element array \{values, indices\}. |
| [`rotary_embedding_qk_varlen`](./rotary_embedding_qk_varlen.md) | a 2-element array \{values, indices\}. |
| [`rotary_embedding_varlen`](./rotary_embedding_varlen.md) | Rotary position embedding over token-packed (variable-length) layouts. |
| [`round`](./round.md) | Elementwise rounding to `decimals` fractional digits. |
| [`round_`](./round_.md) | In-place [`round`](./round.md#round): writes the result through `self`; same formula, arguments, and error conditions as [`round()`](./round.md#round). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`rsqrt`](./rsqrt.md) | Elementwise reciprocal square root. |
| [`rsqrt_`](./rsqrt_.md) | In-place [`rsqrt`](./rsqrt.md#rsqrt): writes the result through `self`; same formula, arguments, and error conditions as [`rsqrt()`](./rsqrt.md#rsqrt). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`scaled_dot_product_attention`](./scaled_dot_product_attention.md) | Scaled dot-product attention over dense head-major tensors. |
| [`scaled_dot_product_attention_varlen`](./scaled_dot_product_attention_varlen.md) | Variable-length (packed) scaled dot-product attention: ragged batches ride one token-packed tensor plus prefix-sum offsets, no padding. |
| [`scatter`](./scatter.md) | A copy of `input` with `src` written at positions given by [`index`](./index-fn.md#index) along `dim`, the write mirror of [`gather`](./gather.md#gather): `out[`[`index`](./index-fn.md#index)`[p]][j][k] = src[p]` for `dim = 0` (only that axis's coordinate is redirected). |
| [`scatter_`](./scatter_.md) | In-place [`scatter`](./scatter.md#scatter): writes through `self` at the indexed positions; same arguments and error conditions as [`scatter()`](./scatter.md#scatter). Writes through `self`'s storage (a strided view reaches its base buffer). Returns `self` for chaining. |
| [`scatter_add`](./scatter_add.md) | [`scatter`](./scatter.md#scatter) with ACCUMULATION: `out[.., `[`index`](./index-fn.md#index)`[p], ..] += src[p]`; duplicate destinations sum. |
| [`scatter_add_`](./scatter_add_.md) | In-place [`scatter_add`](./scatter_add.md#scatter_add): accumulates through `self` at the indexed positions; same arguments (incl. `deterministic`) and error conditions as [`scatter_add()`](./scatter_add.md#scatter_add). A strided view reaches its base buffer. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`scatter_reduce`](./scatter_reduce.md) | [`scatter`](./scatter.md#scatter) with a REDUCTION at each destination: `Sum` / `Prod` / `Mean` / `AMax` / `AMin` ([`ScatterReduceMode`](./index.md#ScatterReduceMode)). |
| [`scatter_reduce_`](./scatter_reduce_.md) | In-place [`scatter_reduce`](./scatter_reduce.md#scatter_reduce): reduces into `self` at the indexed positions; same arguments and error conditions as [`scatter_reduce()`](./scatter_reduce.md#scatter_reduce). A strided view reaches its base buffer. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`searchsorted`](./searchsorted.md) | Insertion points of `values` into a sorted sequence. |
| [`select`](./select.md) | 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. |
| [`selu`](./selu.md) | Scaled exponential linear unit: [`elu`](./elu.md#elu) with the fixed SELU constants (alpha \~= 1.6733, scale \~= 1.0507) from the self-normalizing-networks formulation. |
| [`selu_`](./selu_.md) | In-place [`selu`](./selu.md#selu): writes the result through `self`; same formula, arguments, and error conditions as [`selu()`](./selu.md#selu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`sgn`](./sgn.md) | Elementwise sign; identical to [`sign`](./sign.md#sign) for real dtypes. |
| [`sgn_`](./sgn_.md) | In-place [`sgn`](./sgn.md#sgn): writes the result through `self`; same formula, arguments, and error conditions as [`sgn()`](./sgn.md#sgn). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`shape`](./shape.md) <small>(2 overloads)</small> | The tensor's shape as a 1-D Int64 tensor (or one extent as 0-D). |
| [`shape_host`](./shape_host.md) <small>(3 overloads)</small> | The shape of `input` as a HOST-resident Int64 tensor, written from metadata: no device kernel, no readback, no stream synchronize, whatever device `input` lives on. The cheap way to feed shape values to shape-consuming arguments (a [`reshape`](./reshape.md#reshape) dim) instead of [`Tensor::shape()`](../Tensor.md#shape)'s concrete ints. |
| [`sigmoid`](./sigmoid.md) | Logistic sigmoid. |
| [`sigmoid_`](./sigmoid_.md) | In-place [`sigmoid`](./sigmoid.md#sigmoid): writes the result through `self`; same formula, arguments, and error conditions as [`sigmoid()`](./sigmoid.md#sigmoid). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`sign`](./sign.md) | Elementwise sign: `-1`, `0`, or `1`. |
| [`sign_`](./sign_.md) | In-place [`sign`](./sign.md#sign): writes the result through `self`; same formula, arguments, and error conditions as [`sign()`](./sign.md#sign). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`silu`](./silu.md) | Sigmoid linear unit (swish). |
| [`silu_`](./silu_.md) | In-place [`silu`](./silu.md#silu): writes the result through `self`; same formula, arguments, and error conditions as [`silu()`](./silu.md#silu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`sin`](./sin.md) | Elementwise sine. |
| [`sin_`](./sin_.md) | In-place [`sin`](./sin.md#sin): writes the result through `self`; same formula, arguments, and error conditions as [`sin()`](./sin.md#sin). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`sinc`](./sinc.md) | Elementwise normalized sinc. |
| [`sinc_`](./sinc_.md) | In-place [`sinc`](./sinc.md#sinc): writes the result through `self`; same formula, arguments, and error conditions as [`sinc()`](./sinc.md#sinc). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`sinh`](./sinh.md) | Elementwise hyperbolic sine. |
| [`sinh_`](./sinh_.md) | In-place [`sinh`](./sinh.md#sinh): writes the result through `self`; same formula, arguments, and error conditions as [`sinh()`](./sinh.md#sinh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`slice`](./slice.md) <small>(2 overloads)</small> | `[start, end)` with `step` along one dim. Each bound is an int literal, a 0-D integer [Tensor](../Tensor.md), or absent (`{}`, an open bound); absent step is 1. |
| [`smooth_l1_loss`](./smooth_l1_loss.md) | Smooth-L1 loss: quadratic within `beta` of zero, L1 beyond it. |
| [`snake`](./snake.md) | Periodic "snake" activation (neural vocoders), per channels-last channel. |
| [`snake_`](./snake_.md) | In-place [`snake`](./snake.md#snake): writes the result through `self`; same formula, arguments, and error conditions as [`snake()`](./snake.md#snake). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`softcap_logits`](./softcap_logits.md) | Fused logit soft-cap: `cap * `[`tanh`](./tanh.md#tanh)`(x / cap)` (true division), elementwise. A number cap must be \> 0 (0 or negative is rejected). A tensor cap broadcasts against `input` and every element must be non-zero; that precondition is the caller's contract and is not runtime-checked. |
| [`softcap_logits_`](./softcap_logits_.md) | In-place [`softcap_logits`](./softcap_logits.md#softcap_logits): writes the result through `self`; same formula, arguments, and error conditions as [`softcap_logits()`](./softcap_logits.md#softcap_logits). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`softmax`](./softmax.md) | Softmax along `dim`, computed stably (max-subtracted). |
| [`softmax_`](./softmax_.md) | In-place [`softmax`](./softmax.md#softmax): writes the result through `self`; same formula, arguments, and error conditions as [`softmax()`](./softmax.md#softmax). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`softmin`](./softmin.md) | Softmax of the negated input: weights small values highest. |
| [`softmin_`](./softmin_.md) | In-place [`softmin`](./softmin.md#softmin): writes the result through `self`; same formula, arguments, and error conditions as [`softmin()`](./softmin.md#softmin). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`softplus`](./softplus.md) | Smooth ReLU. |
| [`softplus_`](./softplus_.md) | In-place [`softplus`](./softplus.md#softplus): writes the result through `self`; same formula, arguments, and error conditions as [`softplus()`](./softplus.md#softplus). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`softshrink`](./softshrink.md) | Soft thresholding: shrinks every element toward zero by `lambd`. |
| [`softshrink_`](./softshrink_.md) | In-place [`softshrink`](./softshrink.md#softshrink): writes the result through `self`; same formula, arguments, and error conditions as [`softshrink()`](./softshrink.md#softshrink). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`softsign`](./softsign.md) | Softsign activation. |
| [`softsign_`](./softsign_.md) | In-place [`softsign`](./softsign.md#softsign): writes the result through `self`; same formula, arguments, and error conditions as [`softsign()`](./softsign.md#softsign). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`sort`](./sort.md) | a 2-element array \{values, indices\} of input sorted along dim. |
| [`split_by_size`](./split_by_size.md) | Split along `dim` into pieces of `chunk_size`, [`ceil`](./ceil.md#ceil)`(extent / chunk_size)` of them, the last possibly shorter. Returns VIEWS sharing the source's storage (no copy). |
| [`split_with_sizes`](./split_with_sizes.md) | Split along `dim` into chunks of the given lengths; `sizes` must sum to the dim's extent. Each length is a literal or a 0-D integer [Tensor](../Tensor.md). |
| [`sqrt`](./sqrt.md) | Elementwise square root. |
| [`sqrt_`](./sqrt_.md) | In-place [`sqrt`](./sqrt.md#sqrt): writes the result through `self`; same formula, arguments, and error conditions as [`sqrt()`](./sqrt.md#sqrt). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`square`](./square.md) | Elementwise square. |
| [`square_`](./square_.md) | In-place [`square`](./square.md#square): writes the result through `self`; same formula, arguments, and error conditions as [`square()`](./square.md#square). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`squeeze`](./squeeze.md) | Drop size-1 dims: the listed `dim`s (each must be size 1; anything else raises), or EVERY size-1 dim when `dim` is empty (the default). |
| [`squeeze_`](./squeeze_.md) | In-place [`squeeze`](./squeeze.md#squeeze): reshapes `self`'s handle in place; same rules and error conditions as [`squeeze()`](./squeeze.md#squeeze); the storage is untouched. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`ssd_update`](./ssd_update.md) | Mamba2 / SSD selective-state serving step over a per-sequence `[H, dim, dstate]` Float32 state (updated IN PLACE; the returned tensor is `out [B, T, H, dim]`, dtype following `input`). Per token: the state decays by [`exp`](./exp.md#exp)`(dt'*A[h])` (dt' = [`softplus`](./softplus.md#softplus)`(dt + dt_bias[h])` when `dt_softplus`), accumulates `dt'*(x (`[`outer`](./outer.md#outer)`) B)`, and emits `S*C + D[h]*x` (optionally silu-gated by `gate`). `A`/`D`/`dt_bias` are per-head Float32 parameters (`A` carries the NEGATIVE decay rate; fold `-exp(A_log)` at bind); `B`/`C` are `[B, T, G, dstate]` with `H % G == 0`. Decode is `T == 1`; a prefill runs the same sequential law. `seq_lens` (`[B]` Int32) bounds ragged rows. `slot_ids` (`[B]` Int32, device-resident) addresses `state` as a SLAB `[num_slots, H, dim, dstate]`: batch row `b` reads/updates slab row `slot_ids[b]` in place (ids in range and DISTINCT per call, the caller's contract); absent keeps state row `b`. |
| [`stack`](./stack.md) | Join tensors along a NEW dim at position `dim`: all inputs share one shape; output rank = input rank + 1, the new dim sized N. Copies. |
| [`std`](./std.md) | Standard deviation of `input` over `dims`, with Bessel correction. |
| [`stft`](./stft.md) | Short-time Fourier transform of a real `[L]` / `[B, L]` signal: frames of `win_length` (default `n_fft`) at `hop_length` strides (default `n_fft/4`), windowed by `window` when given (a `[win_length]` tensor; absent = rectangular). Output `[T, n_freq, 2]` / `[B, T, n_freq, 2]` with `n_freq = n_fft/2 + 1`; frames along the time axis first, interleaved (re, im) pairs. `center` pads `n_fft/2` per side in `pad_mode` before framing; `normalized` scales by `1/sqrt(n_fft)`. Only the one-sided form is served; `onesided = false` refuses. |
| [`sub`](./sub.md) <small>(2 overloads)</small> | Subtracts `other` (scaled) from `input` elementwise. |
| [`sub_`](./sub_.md) | In-place [`sub`](./sub.md#sub): writes $act(x - \alpha \cdot other)$ through `x`. ClikaRT::Error as the value form. |
| [`sum`](./sum.md) | Sums `input` over `dims`. |
| [`swiglu`](./swiglu.md) | SwiGLU over a concatenated `[*, 2d]` gate‖up input → `[*, d]`, the clamped gated form: `out = (`[`clamp`](./clamp.md#clamp)`(up, ±limit) + beta) · G · `[`sigmoid`](./sigmoid.md#sigmoid)`(alpha·G)` with `G = min(gate, limit)`. The defaults reduce exactly to the plain `silu(gate) · up`. The last dim must be even. |
| [`synchronize_all`](./synchronize_all.md) | Block until every live stream in the runtime has finished, a barrier for "wait for all enqueued work to complete" (e.g. before reading a device result on the host, or timing a phase). Infallible: it never raises. |
| [`take`](./take.md) | Read elements of `self` at FLAT (row-major linearized) positions. |
| [`take_along_dim`](./take_along_dim.md) | [`gather`](./gather.md#gather) with broadcasting between `input` and [`index`](./index-fn.md#index) on the other dims. |
| [`tan`](./tan.md) | Elementwise tangent. |
| [`tan_`](./tan_.md) | In-place [`tan`](./tan.md#tan): writes the result through `self`; same formula, arguments, and error conditions as [`tan()`](./tan.md#tan). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`tanh`](./tanh.md) | Elementwise hyperbolic tangent. |
| [`tanh_`](./tanh_.md) | In-place [`tanh`](./tanh.md#tanh): writes the result through `self`; same formula, arguments, and error conditions as [`tanh()`](./tanh.md#tanh). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`tensordot`](./tensordot.md) | Named-axis contraction: sums `a` over `dims_a` against `b` over `dims_b`, pairwise. |
| [`threshold`](./threshold.md) | Elementwise threshold: keeps values above [`threshold`](./threshold.md#threshold), replaces the rest with `value`. |
| [`threshold_`](./threshold_.md) | In-place [`threshold`](./threshold.md#threshold): writes the result through `self`; same formula, arguments, and error conditions as [`threshold()`](./threshold.md#threshold). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`tile`](./tile.md) | [`repeat`](./repeat.md#repeat) that also accepts FEWER counts than the rank; missing leading entries default to 1. Counts are literals or 0-D integer Tensors (a tensor count traces symbolically). Copies. |
| [`to`](./to.md) <small>(3 overloads)</small> | Moves a tensor to a device or stream. |
| [`topk`](./topk.md) | a 2-element array \{values, indices\}. |
| [`trace`](./trace.md) | Sum of the main diagonal of a rank-2 tensor. |
| [`transpose`](./transpose.md) | Swap `dim0` and `dim1`, [`permute`](./permute.md#permute) for exactly two dims. Returns a view (no copy). |
| [`tril`](./tril.md) | Zero out the entries ABOVE the chosen diagonal of the last two axes; the lower-triangular part survives. [`diagonal`](./diagonal.md#diagonal): 0 = main, +k above, -k below. Copies. |
| [`tril_`](./tril_.md) | In-place [`tril`](./tril.md#tril): zeroes the upper triangle through `self`; same arguments and error conditions as [`tril()`](./tril.md#tril). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`triu`](./triu.md) | Zero out the entries BELOW the chosen diagonal of the last two axes; the upper-triangular part survives. [`diagonal`](./diagonal.md#diagonal): 0 = main, +k above, -k below. Copies. |
| [`triu_`](./triu_.md) | In-place [`triu`](./triu.md#triu): zeroes the lower triangle through `self`; same arguments and error conditions as [`triu()`](./triu.md#triu). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`trunc`](./trunc.md) | Elementwise truncation toward zero (drops the fraction). |
| [`trunc_`](./trunc_.md) | In-place [`trunc`](./trunc.md#trunc): writes the result through `self`; same formula, arguments, and error conditions as [`trunc()`](./trunc.md#trunc). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`unflatten`](./unflatten.md) | Split the dim at `dim` into `sizes`, the inverse of [`flatten`](./flatten.md#flatten). The product of `sizes` must equal that dim's extent. |
| [`unfold`](./unfold.md) | im2col: extracts sliding kernel windows from a channels-last input. |
| [`uniform_`](./uniform_.md) | In-place uniform fill on `[low, high)`: overwrites `self` at its own shape/dtype and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`unique`](./unique.md) | a 3-element array (see the op's semantics for each element). |
| [`unique_consecutive`](./unique_consecutive.md) | a 3-element array (see the op's semantics for each element). |
| [`unsqueeze`](./unsqueeze.md) | Insert a size-1 dim at `dim`. The position is normalized against the OUTPUT rank, so `-1` appends at the trailing end. Returns a view (no copy). |
| [`unsqueeze_`](./unsqueeze_.md) | In-place [`unsqueeze`](./unsqueeze.md#unsqueeze): reshapes `self`'s handle in place; same rules and error conditions as [`unsqueeze()`](./unsqueeze.md#unsqueeze); the storage is untouched. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`upsample_bicubic2d`](./upsample_bicubic2d.md) | 2-D bicubic resize. |
| [`upsample_bilinear2d`](./upsample_bilinear2d.md) | 2-D bilinear resize. |
| [`upsample_linear1d`](./upsample_linear1d.md) | [`interpolate`](./interpolate.md#interpolate) with [`InterpMode::Linear`](./index.md#InterpMode) (linear / bilinear / trilinear by input rank) or [`InterpMode::Bicubic`](./index.md#InterpMode). |
| [`upsample_nearest1d`](./upsample_nearest1d.md) | [`interpolate`](./interpolate.md#interpolate) with [`InterpMode::Nearest`](./index.md#InterpMode) over a 1d/2d/3d input. |
| [`upsample_nearest2d`](./upsample_nearest2d.md) | 2-D nearest-neighbor resize. |
| [`upsample_nearest3d`](./upsample_nearest3d.md) | 3-D nearest-neighbor resize. |
| [`upsample_trilinear3d`](./upsample_trilinear3d.md) | 3-D trilinear resize. |
| [`validate_rotary_dim`](./validate_rotary_dim.md) | Checks a rotary-embedding configuration up front: `rotary_dim` must be positive, even, and (when `head_dim` is given) no larger than `head_dim`. |
| [`var`](./var.md) | Variance of `input` over `dims`, with Bessel correction. |
| [`where`](./where.md) <small>(2 overloads)</small> | Elementwise select: `condition ? x : y`, with numpy-style broadcasting across all three operands. |
| [`xlog1py`](./xlog1py.md) | Elementwise $a \cdot \log(1 + other)$ with the $0 \cdot \log(0) = 0$ convention (entropy-style sums stay finite where `input` is zero). Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped result at the promoted float dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`xlogy`](./xlogy.md) | Elementwise $a \cdot \log(other)$ with the $0 \cdot \log(0) = 0$ convention. Broadcasts and promotes as [`add`](./add.md#add). the broadcast-shaped result at the promoted float dtype. ClikaRT::Error (INVALID\_ARGUMENT) when the operand shapes are not broadcast-compatible. |
| [`xlogy_`](./xlogy_.md) | In-place [`xlogy`](./xlogy.md#xlogy): writes the result through `x`. ClikaRT::Error as the value form. |
| [`zero_`](./zero_.md) | In-place zero fill: overwrites every element of `self` with zero (the error conditions of [`zeros()`](./zeros.md#zeros)). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling. |
| [`zeros`](./zeros.md) | A new tensor of the given shape with every element set to zero. |
| [`zeros_like`](./zeros_like.md) | A zero-filled tensor with `reference`'s shape and dtype (data never read); [`device`](../device-namespace/index.md) absent = the reference's own device. |

## `ClikaRT/compute/op_enums.h` {#op_enums-h}

```cpp
#include <ClikaRT/compute/op_enums.h>
```

Enum parameters carried by the fused ops: the activation epilogue a matmul/linear/embedding/norm applies in one pass, and the rotary-embedding mode / scaling family. Mirror the internal enums by name and order (ABI: never reorder or remove a value; append new ones at the end).

## `ClikaRT/compute/ops.h` {#ops-h}

```cpp
#include <ClikaRT/compute/ops.h>
```

Core tensor operations as free functions over `Tensor`. Each returns its result BY VALUE and raises [`ClikaRT::Error`](../Error.md) on failure (the inline wrapper throws in your own TU; the `impl::` forms return a Result). Tensors pass BY VALUE, a cheap refcounted handle the runtime may donate; `std::move` one in when you're done with it. Composes directly: `ops::relu(ops::matmul(a, b))`.

## `ClikaRT/compute/tensor.h` {#tensor-h}

```cpp
#include <ClikaRT/compute/tensor.h>
```

The central value type: an N-dimensional array on a device, with a shape, a data type, and a placement. Build one from host data or a factory, move it between devices and dtypes with `to`, and read its bytes back. The op / module / runtime layers all traffic in `Tensor`.

### Macros

#### \#define ICLIKART\_TENSOR\_ACT {#ICLIKART_TENSOR_ACT}

<div class="api-signature">

`#define` **`ICLIKART_TENSOR_ACT(NAME)`** `CLIKART_RESULT(Tensor) NAME() const { CLIKART_UNWRAP(NAME##_impl()); }                \ CLIKART_INPLACE_RESULT(Tensor) NAME##_() { CLIKART_INPLACE_UNWRAP(NAME##_inplace_impl(), *this); }`

</div>

<div class="api-declared">

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

</div>

#### \#define ICLIKART\_TENSOR\_ACT\_IMPL {#ICLIKART_TENSOR_ACT_IMPL}

<div class="api-signature">

`#define` **`ICLIKART_TENSOR_ACT_IMPL(NAME)`** `Result<Tensor> NAME##_impl() const;          \ Result<void>   NAME##_inplace_impl();`

</div>

<div class="api-declared">

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

</div>
