pub fn select_format(avg_nnz_per_row: f64, n_rows: usize) -> SpMatFormatExpand description
Select the recommended sparse format based on average nnz per row and matrix size.
This is a pure heuristic function with no GPU I/O and no format conversion. It is intended to guide decisions about which format to build, not to dispatch an existing GPU matrix.
§Selection rules (evaluated in order)
avg_nnz_per_row <= 2.0→SpMatFormat::Csr(scalar kernel territory)avg_nnz_per_row <= 32.0→SpMatFormat::Ell(regular, coalesced ELL)avg_nnz_per_row > 128.0 && n_rows >= 1024→SpMatFormat::Csr5(load-balanced)- Otherwise →
SpMatFormat::Hyb(irregular overflow pattern)