Skip to content
fn

vadd_i32

void vadd_i32(const int * a, const int * b, int * out, int n)

Signed 32-bit integer elementwise addition.

Computes outi=ai+bi\text{out}_i = a_i + b_i via a plain scalar loop because vDSP has no integer primitives. Only used by the integer-tensor add path.

Parameters

a, bconst std::int32_t*
Input buffers.
outstd::int32_t*
Output buffer.
nstd::size_t
Element count.

Notes

Overflow wraps modulo 2322^{32} following standard C++ semantics for signed integer addition on Apple Silicon.