Expand description
Raw-pointer kernel functions that operate directly on f64 slices.
These bypass the Value::Tensor wrapper, operating on contiguous &[f64]
data. The interpreter resolves tensor pointers once at call entry, then
dispatches to these zero-overhead kernels.
All functions here are safe Rust — they accept slices, not raw pointers.
The “raw pointer” concept means: the interpreter does one to_vec() or
buffer.borrow() at entry, then passes the contiguous slice through.
Functions§
- conv1d_
circular - 1D convolution on a sliding window of a circular buffer.
- conv1d_
dispatched - 1D convolution using dispatched summation.
- conv1d_
raw - 1D convolution with stride=1, no padding (“valid” mode).
- conv2d_
dispatched - 2D convolution using dispatched summation strategy.
- conv2d_
raw - 2D convolution — NCHW layout, valid mode (no padding), configurable stride.
- gelu_
raw - Approximate GELU: x * 0.5 * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
- layer_
norm_ dispatched - Layer normalization using dispatched summation for mean/variance.
- layer_
norm_ raw - Layer normalization over the last dimension.
- linear_
dispatched - Linear projection using dispatched summation.
- linear_
raw - Linear projection: Y[outer, out_f] = X[outer, in_f] @ W^T[out_f, in_f] + bias[out_f]
- matmul_
dispatched - Matrix multiply using dispatched summation strategy.
- matmul_
raw - Matrix multiply: C[m,n] = A[m,k] × B[k,n] with Kahan-summed dots.
- maxpool1d_
raw - Max-pooling over 1D signal, stride = pool_size.
- maxpool2d_
raw - 2D max-pooling — NCHW layout, stride = pool_size (non-overlapping).
- relu_
raw - ReLU: max(0, x) element-wise.
- softmax_
raw - Softmax over the last dimension of a contiguous buffer.