Coverage Report

Created: 2026-09-13 07:06

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/grok/mercury/src/dwt/mod.rs
Line
Count
Source
1
//! DWT lifting engines — Rust, dispatching to Highway SIMD kernels via FFI,
2
//! with scalar fallbacks.
3
4
pub mod fixed97;
5
pub mod hlift;
6
pub mod hsyn;
7
pub mod level_builder;
8
pub mod synthesis;
9
pub mod vlift;
10
11
/// Kernel IDs for the two lifting kernels (passed to the Highway bridge).
12
pub const KERNEL_W9X7: u8 = 0;
13
pub const KERNEL_W5X3: u8 = 1;
14
15
/// SIMD sample-alignment (elements) for the lifting buffers, queried from the
16
/// dispatched kernels so layout granularity matches their vector width.
17
893k
pub fn align_samples32() -> i32 {
18
    static LANES: std::sync::OnceLock<i32> = std::sync::OnceLock::new();
19
893k
    *LANES.get_or_init(|| unsafe { crate::ffi_dwt::mercury_hwy_lanes_32() })
20
893k
}
21
22
311k
pub fn align_samples16() -> i32 {
23
311k
    2 * align_samples32()
24
311k
}