Skip to main content

Module gemv_transpose

Module gemv_transpose 

Source
Expand description

Generic runtime-dispatch transposed matrix–vector product (y += Aᵀ · x).

Plumbs the core register-blocked transposed-GEMV micro-kernel (hermes_simd_core::tiling::TilingStrategy::gemv_transpose) through runtime backend selection, the complement of super::gemv(). A is row-major nrows × ncols, x length nrows, y length ncols; the result accumulates into y (y += Aᵀ·x), so callers wanting y = Aᵀ·x zero y first.

§Theorem (output reuse, reduction-free)

Aᵀx = Σᵢ xᵢ·A[i,:] — a sum of the rows of A scaled by x. Each row is contiguous, so the update vectorizes across the ncols output lanes with no horizontal reduction (unlike A·x). Blocking TILE_N output lane-chunks of y in registers reuses each accumulator across all nrows rows and breaks the per-chunk FMA dependency chain; TILE_N scales with the register file. ∎