pub struct Accelerators { /* private fields */ }Expand description
Dead-stripping bundle of optional SIMD accelerators.
Build a custom subset at compile time using const helpers (SCALAR,
LAYOUT, WEB_SDR, WEB_HDR, HDR, OKLAB, GAINMAP, ROW_PIPELINE, ALL, .with_*(),
.merge_prefer_self()).
§Bundle Composition
| Constant | Byte layout | Strip SIMD | sRGB + 3×3 + srgb8 matrix | BT.709 / γ2.2 | F16 + PQ/HLG | Oklab | GainMap |
|---|---|---|---|---|---|---|---|
SCALAR | — | — | — | — | — | — | — |
LAYOUT | ✓ | — | — | — | — | — | — |
WEB_SDR | ✓ | ✓ | ✓ | — | — | — | — |
WEB_HDR | ✓ | ✓ | ✓ | pow only* | ✓ (if feature) | — | ✓ (if feature) |
HDR | — | ✓ | gamut 3×3 only | — | ✓ | — | — |
OKLAB | — | ✓ | — | — | — | ✓ | — |
GAINMAP | — | — | — | pow only | — | — | ✓ |
ROW_PIPELINE (default w/ fast) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (if feature) | — |
ALL | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (if feature) | ✓ (if feature) |
Implementations§
Source§impl Accelerators
impl Accelerators
Sourcepub const WEB_SDR: Self
pub const WEB_SDR: Self
Common web SDR workload: byte layouts + SIMD strip codec + sRGB + 3×3 gamut + fused U8 P3/sRGB matrix.
Links zero BT.709, Gamma 2.2, F16, PQ, HLG, gain-map, or Oklab SIMD code.
Sourcepub const HDR: Self
pub const HDR: Self
HDR & half-float workload: SIMD strip codec + F16C/NEON-fp16 + PQ/HLG + 3×3 gamut.
Links zero gain-map SIMD code; chain .with_gainmap() (requires the gainmap feature)
when reconstructing ISO 21496-1 / UltraHDR gain maps, or use WEB_HDR.
Sourcepub const WEB_HDR: Self
pub const WEB_HDR: Self
Modern web HDR workload (AVIF, JXL, UltraHDR, WebP/PNG/JPEG):
WEB_SDR + HDR + GAINMAP (when
feature = "gainmap" is enabled).
Accelerates byte layouts, SIMD strip codecs, sRGB, 3×3 gamut, fused U8 P3/sRGB matrix,
hardware F16C/NEON-fp16, PQ/HLG SIMD (when hdr-transfers is enabled), and ISO 21496-1 /
UltraHDR gain maps (when gainmap is enabled). Dead-strips BT.709, Gamma 2.2, and Oklab.
Sourcepub const GAINMAP: Self
pub const GAINMAP: Self
ISO 21496-1 / UltraHDR gain-map SIMD kernels only (opt-in so RowPlan-only binaries dead-strip them).
Included in WEB_HDR and ALL, excluded from
ROW_PIPELINE and Accelerators::default(). Combine with
Self::WEB_SDR.merge_prefer_self(Self::GAINMAP) when minimizing binary size.
Sourcepub const ROW_PIPELINE: Self
pub const ROW_PIPELINE: Self
Every enabled RowPlan / ImagePlan SIMD accelerator in this build (excludes opt-in
gain-map SIMD so non-gainmap binaries dead-strip it completely; this is also
Accelerators::default() when feature = "fast" is enabled).
Sourcepub const ALL: Self
pub const ALL: Self
Every compiled SIMD accelerator in this build, including GAINMAP when the
gainmap feature is enabled.
For RowPlan-only binaries that want to dead-strip gain-map SIMD (+0 B), use
ROW_PIPELINE instead.
Sourcepub fn install_global(self) -> bool
pub fn install_global(self) -> bool
Install this bundle process-wide. Returns whether this call installed it.
The first call wins. Later calls leave the installed bundle in place.
Sourcepub const fn has_byte_layout(&self) -> bool
pub const fn has_byte_layout(&self) -> bool
Whether garb SIMD byte-layout fast paths are enabled.
Sourcepub const fn has_strip_simd(&self) -> bool
pub const fn has_strip_simd(&self) -> bool
Whether native-width SIMD strip unpack/pack and depth codecs are enabled.
Sourcepub const fn with_byte_layout(self) -> Self
pub const fn with_byte_layout(self) -> Self
Enable garb byte-only layout fast paths & SIMD U8 premultiplication.
Sourcepub const fn with_strip_simd(self) -> Self
pub const fn with_strip_simd(self) -> Self
Enable native-width SIMD AoS↔SoA strip unpack/pack and contiguous depth codecs.
Sourcepub const fn with_srgb(self) -> Self
pub const fn with_srgb(self) -> Self
Enable SIMD sRGB EOTF & OETF (linear-srgb) + fused linear F32 → sRGB U8.
Sourcepub const fn with_bt709(self) -> Self
pub const fn with_bt709(self) -> Self
Enable SIMD BT.709 EOTF & OETF (magemath::Powf).
Sourcepub const fn with_gamma22(self) -> Self
pub const fn with_gamma22(self) -> Self
Enable SIMD Gamma 2.2 (2.2), Adobe RGB (563/256), and DCI Cinema (2.6) EOTF & OETF (magemath::Powf).
Sourcepub const fn with_gamut_3x3(self) -> Self
pub const fn with_gamut_3x3(self) -> Self
Enable SIMD 3×3 linear gamut matrix multiply.
Sourcepub const fn with_gainmap(self) -> Self
pub const fn with_gainmap(self) -> Self
Enable ISO 21496-1 / UltraHDR gain-map SIMD kernels (vertical resampling blend,
magemath::Expf gain decode, and linear RGB(A) multiply-add combine).
Kept opt-in (excluded from ROW_PIPELINE and HDR,
included in WEB_HDR and ALL) so non-gainmap RowPlan
binaries dead-strip gain-map SIMD completely (+0 B).
Sourcepub const fn with_f16(self) -> Self
pub const fn with_f16(self) -> Self
Enable hardware f16 ↔ f32 slice conversion (F16C / NEON-fp16).
Sourcepub const fn with_oklab(self) -> Self
pub const fn with_oklab(self) -> Self
Enable SIMD Oklab conversions (magemath::Cbrtf) & SoftCompress.
Sourcepub const fn with_hdr_simd(self) -> Self
pub const fn with_hdr_simd(self) -> Self
Enable SIMD PQ, HLG Scene, and BT.2100-3 HLG display rendering.
Sourcepub const fn merge_prefer_self(self, fallback: Self) -> Self
pub const fn merge_prefer_self(self, fallback: Self) -> Self
Combine two accelerator bundles (self takes precedence where both enable the same slot).
Trait Implementations§
Source§impl Clone for Accelerators
impl Clone for Accelerators
Source§fn clone(&self) -> Accelerators
fn clone(&self) -> Accelerators
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more