1 | // pathfinder/simd/src/lib.rs |
2 | // |
3 | // Copyright © 2019 The Pathfinder Project Developers. |
4 | // |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
8 | // option. This file may not be copied, modified, or distributed |
9 | // except according to those terms. |
10 | |
11 | #![cfg_attr (pf_rustc_nightly, allow(internal_features))] |
12 | #![cfg_attr (pf_rustc_nightly, feature(link_llvm_intrinsics, core_intrinsics))] |
13 | #![cfg_attr (pf_rustc_nightly, feature(simd_ffi))] |
14 | |
15 | //! A minimal SIMD abstraction, usable outside of Pathfinder. |
16 | |
17 | #[cfg (all(not(feature = "pf-no-simd" ), pf_rustc_nightly, target_arch = "aarch64" ))] |
18 | pub use crate::arm as default; |
19 | #[cfg (any( |
20 | feature = "pf-no-simd" , |
21 | not(any( |
22 | target_arch = "x86" , |
23 | target_arch = "x86_64" , |
24 | all(pf_rustc_nightly, target_arch = "aarch64" ) |
25 | )) |
26 | ))] |
27 | pub use crate::scalar as default; |
28 | #[cfg (all( |
29 | not(feature = "pf-no-simd" ), |
30 | any(target_arch = "x86" , target_arch = "x86_64" ) |
31 | ))] |
32 | pub use crate::x86 as default; |
33 | |
34 | #[cfg (all(pf_rustc_nightly, target_arch = "aarch64" ))] |
35 | pub mod arm; |
36 | mod extras; |
37 | pub mod scalar; |
38 | #[cfg (any(target_arch = "x86" , target_arch = "x86_64" ))] |
39 | pub mod x86; |
40 | |
41 | #[cfg (test)] |
42 | mod test; |
43 | |