-
Notifications
You must be signed in to change notification settings - Fork 160
/
bool.rs
68 lines (56 loc) · 1.88 KB
/
bool.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
mod bvec2;
mod bvec3;
mod bvec4;
#[cfg(all(target_feature = "sse2", not(feature = "scalar-math")))]
mod sse2;
#[cfg(all(target_feature = "simd128", not(feature = "scalar-math")))]
mod wasm32;
pub use bvec2::BVec2;
pub use bvec3::BVec3;
pub use bvec4::BVec4;
#[cfg(all(target_feature = "sse2", not(feature = "scalar-math")))]
pub use sse2::bvec3a::BVec3A;
#[cfg(all(target_feature = "sse2", not(feature = "scalar-math")))]
pub use sse2::bvec4a::BVec4A;
#[cfg(all(target_feature = "simd128", not(feature = "scalar-math")))]
pub use wasm32::bvec3a::BVec3A;
#[cfg(all(target_feature = "simd128", not(feature = "scalar-math")))]
pub use wasm32::bvec4a::BVec4A;
#[cfg(any(
not(any(target_feature = "sse2", target_feature = "simd128")),
feature = "scalar-math"
))]
pub type BVec3A = BVec3;
#[cfg(any(
not(any(target_feature = "sse2", target_feature = "simd128")),
feature = "scalar-math"
))]
pub type BVec4A = BVec4;
mod const_test_bvec2 {
const_assert_eq!(1, core::mem::align_of::<super::BVec2>());
const_assert_eq!(2, core::mem::size_of::<super::BVec2>());
}
mod const_test_bvec3 {
const_assert_eq!(1, core::mem::align_of::<super::BVec3>());
const_assert_eq!(3, core::mem::size_of::<super::BVec3>());
}
mod const_test_bvec4 {
const_assert_eq!(1, core::mem::align_of::<super::BVec4>());
const_assert_eq!(4, core::mem::size_of::<super::BVec4>());
}
#[cfg(all(
any(target_feature = "sse2", target_feature = "simd128"),
not(feature = "scalar-math")
))]
mod const_test_bvec3a {
const_assert_eq!(16, core::mem::align_of::<super::BVec3A>());
const_assert_eq!(16, core::mem::size_of::<super::BVec3A>());
}
#[cfg(all(
any(target_feature = "sse2", target_feature = "simd128"),
not(feature = "scalar-math")
))]
mod const_test_bvec4a {
const_assert_eq!(16, core::mem::align_of::<super::BVec4A>());
const_assert_eq!(16, core::mem::size_of::<super::BVec4A>());
}