From: miguel raz Date: Wed, 26 May 2021 01:10:55 +0000 (-0500) Subject: Simdf64 from attempt X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=ab6af37f8f9ba27df1cf24789a7c3f50bf3005cf;p=rust.git Simdf64 from attempt --- diff --git a/crates/core_simd/examples/nbody.rs b/crates/core_simd/examples/nbody.rs index 4ca371f4456..cbdcf848fee 100644 --- a/crates/core_simd/examples/nbody.rs +++ b/crates/core_simd/examples/nbody.rs @@ -5,11 +5,16 @@ const SOLAR_MASS: f64 = 4.0 * PI * PI; const DAYS_PER_YEAR: f64 = 365.24; +#[derive(Debug)] +#[repr(simd)] pub struct Body { - pub x: f64x4, - pub v: f64x4, + pub x: Simdf64([f64, 4]), + pub v: Simdf64([f64, 4]), pub mass: f64, } + +// Translation attempt is this ^^^ far +// const N_BODIES: usize = 5; #[allow(clippy::unreadable_literal)] const BODIES: [Body; N_BODIES] = [