pub fn bfs_parallel(
adj: &CsrMatrix,
sources: &[NodeId],
) -> Result<Vec<Distance>>Expand description
Parallel BFS implementation (frontier-based).
Uses level-synchronous approach suitable for GPU parallelization:
- Process all nodes in current frontier in parallel
- Collect next frontier
- Repeat until no more nodes to explore
On CPU, this uses rayon for parallelism (when available). The same algorithm structure maps directly to GPU kernels.