Skip to main content

gemv_f64

Function gemv_f64 

Source
pub fn gemv_f64(
    m: usize,
    n: usize,
    a: &[f64],
    x: &[f64],
) -> Result<Vec<f64>, ForgeError>
Expand description

Best-path double-precision dense GEMV: row-major y[M] = A[M×N] · x[N], all f64.

Path selection (see the module doc for why this differs from gemv_f32 — WGSL has no f64):

  1. native CUDA-f64 GPU — when caps().cuda is set and the problem is at least GEMM_GPU_THRESHOLD MACs (m * n), run the native double-precision CUDA GEMV. On any runtime error the call falls through to the CPU floor (never propagated).
  2. CPU floor — otherwise compute on the CPU via gemv_cpu_f64.

There is intentionally no WGSL path here: WGSL has no f64. Today the f64 chain is exactly CUDA-f64 → CPU.

a must have m * n elements (row-major) and x must have n. Returns m row elements.