1#![allow(non_camel_case_types)]
17
18mod f32x16_t;
19mod f32x4_t;
20mod f32x8_t;
21mod i32x4_t;
22mod i32x8_t;
23mod u16x16_t;
24mod u32x4_t;
25mod u32x8_t;
26
27pub use f32x16_t::f32x16;
28pub use f32x4_t::f32x4;
29pub use f32x8_t::f32x8;
30pub use i32x4_t::i32x4;
31pub use i32x8_t::i32x8;
32#[allow(unused_imports)]
33pub use tiny_skia_path::f32x2;
34pub use u16x16_t::u16x16;
35pub use u32x4_t::u32x4;
36pub use u32x8_t::u32x8;
37
38#[allow(dead_code)]
39#[inline]
40pub fn generic_bit_blend<T>(mask: T, y: T, n: T) -> T
41where
42 T: Copy + core::ops::BitXor<Output = T> + core::ops::BitAnd<Output = T>,
43{
44 n ^ ((n ^ y) & mask)
45}
46
47#[allow(dead_code)]
51pub trait FasterMinMax {
52 fn faster_min(self, rhs: f32) -> f32;
53 fn faster_max(self, rhs: f32) -> f32;
54}
55
56#[allow(dead_code)]
57impl FasterMinMax for f32 {
58 fn faster_min(self, rhs: f32) -> f32 {
59 if rhs < self {
60 rhs
61 } else {
62 self
63 }
64 }
65
66 fn faster_max(self, rhs: f32) -> f32 {
67 if self < rhs {
68 rhs
69 } else {
70 self
71 }
72 }
73}