pathfinder_simd/
lib.rs

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