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, feature(link_llvm_intrinsics, platform_intrinsics))] |
12 | #![cfg_attr (pf_rustc_nightly, feature(simd_ffi, stdsimd))] |
13 | |
14 | //! A minimal SIMD abstraction, usable outside of Pathfinder. |
15 | |
16 | #[cfg (all(not(feature = "pf-no-simd" ), pf_rustc_nightly, target_arch = "aarch64" ))] |
17 | pub use crate::arm as default; |
18 | #[cfg (any( |
19 | feature = "pf-no-simd" , |
20 | not(any( |
21 | target_arch = "x86" , |
22 | target_arch = "x86_64" , |
23 | all(pf_rustc_nightly, target_arch = "aarch64" ) |
24 | )) |
25 | ))] |
26 | pub use crate::scalar as default; |
27 | #[cfg (all( |
28 | not(feature = "pf-no-simd" ), |
29 | any(target_arch = "x86" , target_arch = "x86_64" ) |
30 | ))] |
31 | pub use crate::x86 as default; |
32 | |
33 | #[cfg (all(pf_rustc_nightly, target_arch = "aarch64" ))] |
34 | pub mod arm; |
35 | mod extras; |
36 | pub mod scalar; |
37 | #[cfg (any(target_arch = "x86" , target_arch = "x86_64" ))] |
38 | pub mod x86; |
39 | |
40 | #[cfg (test)] |
41 | mod test; |
42 | |