Expand description
HYB (Hybrid ELL+COO) sparse matrix format.
The HYB format splits a sparse matrix into two portions:
- An ELL (ELLPACK) portion storing the regular part: up to
ell_widthentries per row, padded with sentinel values (-1) for unused slots. - A COO (Coordinate) overflow portion storing entries that exceed the ELL width.
This hybrid approach combines the coalesced memory access benefits of ELL (for rows with typical density) with the flexibility of COO (for rows with atypical density), yielding better performance than either format alone on matrices with irregular sparsity patterns.
The HybPartition enum controls how the ELL width is chosen:
Autouses the median row nnz (good default).Maxuses the maximum row nnz (pure ELL, no COO overflow).Threshold(f64)uses a percentile of the row nnz distribution.Fixed(usize)lets the user specify the ELL width directly.
Structs§
- HybMatrix
- A sparse matrix in HYB (Hybrid ELL+COO) format, stored on host.
- HybStatistics
- Statistics describing the quality of the HYB partition.
Enums§
- HybPartition
- Strategy for partitioning non-zeros between ELL and COO portions.
Constants§
- HYB_
ELL_ SENTINEL - Sentinel value for unused ELL entries in the HYB format.
Functions§
- optimal_
ell_ width - Compute the optimal ELL width from a distribution of per-row nnz counts.