aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-09-22 17:57:29 +0200
committerCrozet Sébastien <developer@crozet.re>2020-09-28 15:27:25 +0200
commit84bd60e4a5b88c9aa824797c8a444945b46e96b2 (patch)
treed7561128c1f402685018854cadcd5c452c18b1bd /src/lib.rs
parenta7d77a01447d2b77694b2a957d000790af60b383 (diff)
downloadrapier-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.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8cbf673..3674717 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;