polyval/
backend.rs

1//! POLYVAL backends
2
3#[cfg_attr(not(target_pointer_width = "64"), path = "backend/soft32.rs")]
4#[cfg_attr(target_pointer_width = "64", path = "backend/soft64.rs")]
5mod soft;
6
7use cfg_if::cfg_if;
8
9cfg_if! {
10    if #[cfg(all(target_arch = "aarch64", polyval_armv8, not(polyval_force_soft)))] {
11        mod autodetect;
12        mod pmull;
13        pub use crate::backend::autodetect::Polyval;
14    } else if #[cfg(all(
15        any(target_arch = "x86_64", target_arch = "x86"),
16        not(polyval_force_soft)
17    ))] {
18        mod autodetect;
19        mod clmul;
20        pub use crate::backend::autodetect::Polyval;
21    } else {
22        pub use crate::backend::soft::Polyval;
23    }
24}