This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use fearless_simd::{Level, Select, Simd, SimdInto, dispatch, f32x4}; | |
| #[repr(C)] | |
| #[derive(Clone, Copy, Debug)] | |
| struct Point { | |
| x: f32, | |
| y: f32, | |
| } | |
| impl Point { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use kurbo::{CubicBez, ParamCurveDeriv}; | |
| /// Compute bounds on curvature | |
| pub fn kbound(c: CubicBez) -> (f64, f64) { | |
| let q = c.deriv(); | |
| let p1xp0 = q.p1.to_vec2().cross(q.p0.to_vec2()); | |
| let p2xp0 = q.p2.to_vec2().cross(q.p0.to_vec2()); | |
| let p2xp1 = q.p2.to_vec2().cross(q.p1.to_vec2()); | |
| let c0 = 2. * p1xp0; | |
| let c1 = 2. * (p2xp0 - 2.0 * p1xp0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 49309841ba5cb7db0989a87c0a1d4b2947f02314 | |
| Merge: 3abe852 de4ec3f | |
| Author: Raph Levien <[email protected]> | |
| Date: Wed Jun 11 08:12:42 2025 -0700 | |
| On gen2: half experiment | |
| diff --cc fearless_simd/src/generated/simd_trait.rs | |
| index 875ccad,875ccad..544068b | |
| --- a/fearless_simd/src/generated/simd_trait.rs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// A structure representing a system that tracks "foozles". | |
| pub struct FoozleTracker { | |
| /// The current count of foozles observed. | |
| /// We use u64 to provide a massive range (0 to 18,446,744,073,709,551,615), | |
| /// minimizing the risk of counter overflow in most practical applications. | |
| pub foozle_count: u64, | |
| } | |
| impl FoozleTracker { | |
| /// Creates a new FoozleTracker starting at zero. |
OlderNewer