diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-01-21 21:02:23 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-01-21 21:02:27 +0100 |
| commit | 9b87f06a856c4d673642e210f8b0986cfdbac3af (patch) | |
| tree | b4f4eaac0e5004f8ba3fccd42e5aea4fd565dcc6 /src/dynamics/solver/interaction_groups.rs | |
| parent | 9ac3503b879f95fcdf5414470ba5aedf195b9a97 (diff) | |
| download | rapier-9b87f06a856c4d673642e210f8b0986cfdbac3af.tar.gz rapier-9b87f06a856c4d673642e210f8b0986cfdbac3af.tar.bz2 rapier-9b87f06a856c4d673642e210f8b0986cfdbac3af.zip | |
feat: implement new "small-steps" solver + joint improvements
Diffstat (limited to 'src/dynamics/solver/interaction_groups.rs')
| -rw-r--r-- | src/dynamics/solver/interaction_groups.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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<u128>, #[cfg(feature = "simd-is-enabled")] - pub grouped_interactions: Vec<usize>, + pub simd_interactions: Vec<usize>, pub nongrouped_interactions: Vec<usize>, } @@ -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." ); } |
