Last updated: 2026-06-12

Inference Runtime

Vadd

All API Sections

T-CPU element-wise vector addition implementation.

Computes: output[i] = a[i] + b[i]

2 exports shown

struct

Params

#
pub const Params = struct

Inputs and outputs for one element-wise vector addition.

Parameters

a
First operand vector.
b
Second operand vector of length `>= a.len`.
output
Destination vector of length `>= a.len`.

src/zinc_rt/isa/cpu_zig/vadd.zig:10

function

run

#
pub fn run(params: Params) !void

Compute `output[i] = a[i] + b[i]` for the first `a.len` elements.

Trailing elements of `b` and `output` are ignored, so callers may pass over-sized buffers. is shorter than `a`, otherwise void.

Parameters

params
Operand and destination slices; see `Params`.

Returns

`error.EmptyInput` when `a` is empty, `error.ShapeMismatch` when `output` or `b`

src/zinc_rt/isa/cpu_zig/vadd.zig:21