Fix warnings and 2D compilation when parallelism is ON but SIMD is OFF.

This commit is contained in:
Crozet Sébastien
2021-01-23 12:58:45 +01:00
parent 57072f3ba7
commit 00caa7ce35
7 changed files with 13 additions and 65 deletions

View File

@@ -50,24 +50,6 @@ pub(crate) enum AnyJointPositionConstraint {
}
impl AnyJointPositionConstraint {
#[cfg(feature = "parallel")]
pub fn num_active_constraints(joint: &Joint, grouped: bool) -> usize {
#[cfg(feature = "simd-is-enabled")]
if !grouped {
1
} else {
match &joint.params {
JointParams::BallJoint(_) => 1,
_ => SIMD_WIDTH, // For joints that don't support SIMD position constraints yet.
}
}
#[cfg(not(feature = "simd-is-enabled"))]
{
1
}
}
pub fn from_joint(joint: &Joint, bodies: &RigidBodySet) -> Self {
let rb1 = &bodies[joint.body1];
let rb2 = &bodies[joint.body2];