Skip to main content

gemm_batched_ptr_unchecked

Function gemm_batched_ptr_unchecked 

Source
pub unsafe fn gemm_batched_ptr_unchecked<T: GemmScalar>(
    problems: &[GemmProblem<T>],
    par: Parallelism,
)
Expand description

Runs a pointer-array batched GEMM: every element in problems is an independent product with its own shape and pointers (GemmProblem). This parallelizes across the batch, with whole GEMMs assigned to workers, each run serially and cache-hot. The raw counterpart of gemm_batched_slice, for callers (FFI, adapters) that validate their own inputs and may use arbitrary pointers or negative strides. Deterministic across thread counts, since each element runs wholly on 1 worker, and takes the problems slice as-is with no per-call allocation

ยงSafety

For each problem, a/b are valid for reads and c for read+write over the shape and strides. When beta == 0, c need not be initialized. Across the batch, the c regions must be pairwise disjoint and none may alias any a/b, since writes run concurrently