From 9b87f06a856c4d673642e210f8b0986cfdbac3af Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 21 Jan 2024 21:02:23 +0100 Subject: feat: implement new "small-steps" solver + joint improvements --- src/dynamics/solver/interaction_groups.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/dynamics/solver/interaction_groups.rs') diff --git a/src/dynamics/solver/interaction_groups.rs b/src/dynamics/solver/interaction_groups.rs index d2e45eb..40fbe92 100644 --- a/src/dynamics/solver/interaction_groups.rs +++ b/src/dynamics/solver/interaction_groups.rs @@ -171,7 +171,7 @@ pub(crate) struct InteractionGroups { #[cfg(feature = "simd-is-enabled")] body_masks: Vec, #[cfg(feature = "simd-is-enabled")] - pub grouped_interactions: Vec, + pub simd_interactions: Vec, pub nongrouped_interactions: Vec, } @@ -183,7 +183,7 @@ impl InteractionGroups { #[cfg(feature = "simd-is-enabled")] body_masks: Vec::new(), #[cfg(feature = "simd-is-enabled")] - grouped_interactions: Vec::new(), + simd_interactions: Vec::new(), nongrouped_interactions: Vec::new(), } } @@ -194,7 +194,7 @@ impl InteractionGroups { // { // self.buckets.clear(); // self.body_masks.clear(); - // self.grouped_interactions.clear(); + // self.simd_interactions.clear(); // } // self.nongrouped_interactions.clear(); // } @@ -300,7 +300,7 @@ impl InteractionGroups { if bucket.1 == SIMD_LAST_INDEX { // We completed our group. (bucket.0)[SIMD_LAST_INDEX] = *interaction_i; - self.grouped_interactions.extend_from_slice(&bucket.0); + self.simd_interactions.extend_from_slice(&bucket.0); bucket.1 = 0; occupied_mask &= !target_mask_bit; @@ -340,20 +340,20 @@ impl InteractionGroups { self.body_masks.iter_mut().for_each(|e| *e = 0); assert!( - self.grouped_interactions.len() % SIMD_WIDTH == 0, + self.simd_interactions.len() % SIMD_WIDTH == 0, "Invalid SIMD contact grouping." ); // println!( // "Num grouped interactions: {}, nongrouped: {}", - // self.grouped_interactions.len(), + // self.simd_interactions.len(), // self.nongrouped_interactions.len() // ); } pub fn clear_groups(&mut self) { #[cfg(feature = "simd-is-enabled")] - self.grouped_interactions.clear(); + self.simd_interactions.clear(); self.nongrouped_interactions.clear(); } @@ -466,7 +466,7 @@ impl InteractionGroups { if bucket.1 == SIMD_LAST_INDEX { // We completed our group. (bucket.0)[SIMD_LAST_INDEX] = *interaction_i; - self.grouped_interactions.extend_from_slice(&bucket.0); + self.simd_interactions.extend_from_slice(&bucket.0); bucket.1 = 0; occupied_mask = occupied_mask & (!target_mask_bit); } else { @@ -497,7 +497,7 @@ impl InteractionGroups { } assert!( - self.grouped_interactions.len() % SIMD_WIDTH == 0, + self.simd_interactions.len() % SIMD_WIDTH == 0, "Invalid SIMD contact grouping." ); } -- cgit From bef72df32c6f5c9275b82b38b387e9295430814a Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Mon, 22 Jan 2024 21:06:33 +0100 Subject: chore: CI fixes --- src/dynamics/solver/interaction_groups.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/dynamics/solver/interaction_groups.rs') diff --git a/src/dynamics/solver/interaction_groups.rs b/src/dynamics/solver/interaction_groups.rs index 40fbe92..d654a59 100644 --- a/src/dynamics/solver/interaction_groups.rs +++ b/src/dynamics/solver/interaction_groups.rs @@ -32,6 +32,7 @@ impl<'a> PairInteraction for JointGraphEdge { } #[cfg(feature = "parallel")] +#[allow(dead_code)] // That will likely be useful when we re-introduce intra-island parallelism. pub(crate) struct ParallelInteractionGroups { bodies_color: Vec, // Workspace. interaction_indices: Vec, // Workspace. @@ -41,6 +42,7 @@ pub(crate) struct ParallelInteractionGroups { } #[cfg(feature = "parallel")] +#[allow(dead_code)] // That will likely be useful when we re-introduce intra-island parallelism. impl ParallelInteractionGroups { pub fn new() -> Self { Self { -- cgit