#[cfg(all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
))]
mod x86_64;
#[cfg(all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
))]
mod aarch64;
#[cfg(any(
all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
),
all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
)
))]
pub(crate) mod poly192;
#[cfg(any(
all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
),
all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
)
))]
mod poly64;
#[cfg(any(
test,
all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
)
))]
pub(crate) mod split;
#[cfg(all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
))]
mod selected {
use super::x86_64::PackedGhash128;
pub(crate) use super::x86_64::lanes;
use super::{PackedPoly64, PackedPoly192};
pub(crate) type Ghash128Packing = PackedGhash128;
pub(crate) type Poly64Packing = PackedPoly64;
pub(crate) type Poly192Packing = PackedPoly192;
}
#[cfg(all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
))]
mod selected {
use super::{PackedPoly64, PackedPoly192};
pub(crate) type Ghash128Packing = super::aarch64::PackedGhash128;
pub(crate) type Poly64Packing = PackedPoly64;
pub(crate) type Poly192Packing = PackedPoly192;
}
#[cfg(not(any(
all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
),
all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
)
)))]
mod selected {
pub(crate) type Ghash128Packing = crate::Ghash128;
pub(crate) type Poly64Packing = crate::Poly64;
pub(crate) type Poly192Packing = crate::Poly192;
}
#[cfg(all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
))]
pub use aarch64::PackedGhash128;
#[cfg(all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
))]
use aarch64::gf64;
#[cfg(any(
all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
),
all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
)
))]
pub use poly64::PackedPoly64;
#[cfg(any(
all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
),
all(
target_arch = "aarch64",
target_endian = "little",
target_feature = "aes"
)
))]
pub use poly192::{PackedPoly192, PackedPoly192Unreduced};
pub(crate) use selected::*;
#[cfg(all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
))]
pub use x86_64::PackedGhash128;
#[cfg(all(
target_arch = "x86_64",
target_feature = "vpclmulqdq",
any(target_feature = "avx2", target_feature = "avx512f")
))]
#[cfg(not(all(
feature = "wide-poly",
target_feature = "avx512f",
target_feature = "avx512bw"
)))]
use x86_64::lanes::gf64;
#[cfg(all(
feature = "wide-poly",
target_arch = "x86_64",
target_feature = "avx512f",
target_feature = "avx512bw",
target_feature = "vpclmulqdq"
))]
mod avx512_poly;
#[cfg(all(
feature = "wide-poly",
target_arch = "x86_64",
target_feature = "avx512f",
target_feature = "avx512bw",
target_feature = "vpclmulqdq"
))]
use avx512_poly::gf64;