diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-09-22 17:57:29 +0200 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-09-28 15:27:25 +0200 |
| commit | 84bd60e4a5b88c9aa824797c8a444945b46e96b2 (patch) | |
| tree | d7561128c1f402685018854cadcd5c452c18b1bd /src/lib.rs | |
| parent | a7d77a01447d2b77694b2a957d000790af60b383 (diff) | |
| download | rapier-84bd60e4a5b88c9aa824797c8a444945b46e96b2.tar.gz rapier-84bd60e4a5b88c9aa824797c8a444945b46e96b2.tar.bz2 rapier-84bd60e4a5b88c9aa824797c8a444945b46e96b2.zip | |
Fix compilation when SIMD is not enabled.
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -219,8 +219,15 @@ pub mod math { #[cfg(not(feature = "simd-is-enabled"))] mod simd { + use simba::simd::{AutoBoolx4, AutoF32x4}; /// The number of lanes of a SIMD number. pub const SIMD_WIDTH: usize = 4; + /// SIMD_WIDTH - 1 + pub const SIMD_LAST_INDEX: usize = 3; + /// A SIMD float with SIMD_WIDTH lanes. + pub type SimdFloat = AutoF32x4; + /// A SIMD bool with SIMD_WIDTH lanes. + pub type SimdBool = AutoBoolx4; } #[cfg(feature = "simd-is-enabled")] @@ -236,16 +243,16 @@ mod simd { /// SIMD_WIDTH - 1 pub const SIMD_LAST_INDEX: usize = 3; #[cfg(not(feature = "simd-nightly"))] - /// A SIMD float with SIMD_WIDTH lanes. + /// A SIMD float with SIMD_WIDTH lanes. pub type SimdFloat = WideF32x4; #[cfg(not(feature = "simd-nightly"))] - /// A SIMD bool with SIMD_WIDTH lanes. + /// A SIMD bool with SIMD_WIDTH lanes. pub type SimdBool = WideBoolF32x4; #[cfg(feature = "simd-nightly")] - /// A SIMD float with SIMD_WIDTH lanes. + /// A SIMD float with SIMD_WIDTH lanes. pub type SimdFloat = f32x4; #[cfg(feature = "simd-nightly")] - /// A bool float with SIMD_WIDTH lanes. + /// A bool float with SIMD_WIDTH lanes. pub type SimdBool = m32x4; // pub const SIMD_WIDTH: usize = 8; |
