1use cfg_if::cfg_if;
4
5mod arch_optimal;
6mod shared;
7mod strategies;
8
9cfg_if! {
10 if #[cfg(all(target_arch = "x86_64"))] {
11 #[allow(dead_code)]
12 mod portable;
13
14 mod x86_64;
15 pub use x86_64::{packed_128, packed_256, packed_512, packed_aes_128, packed_aes_256, packed_aes_512, packed_ghash_128, packed_ghash_256, packed_ghash_512, m128::M128, M256};
16 } else if #[cfg(target_arch = "aarch64")] {
17 #[allow(dead_code)]
18 mod portable;
19
20 mod aarch64;
21 pub use aarch64::{packed_128, packed_aes_128, packed_ghash_128, M128};
22 pub use portable::{packed_256::{self, M256}, packed_512, packed_aes_256, packed_aes_512, packed_ghash_256, packed_ghash_512};
23 } else if #[cfg(target_arch = "wasm32")] {
24 #[allow(dead_code)]
25 mod portable;
26
27 mod wasm32;
28 pub use wasm32::{packed_ghash_128, packed_ghash_256};
29 pub use portable::{packed_128::{self, M128}, packed_256::{self, M256}, packed_512, packed_aes_128, packed_aes_256, packed_aes_512, packed_ghash_512};
30 } else {
31 mod portable;
32 pub use u128 as M128;
33 pub use portable::{packed_128::{self, M128}, packed_256::{self, M256}, packed_512, packed_aes_128, packed_aes_256, packed_aes_512, packed_ghash_128, packed_ghash_256, packed_ghash_512};
34 }
35}
36
37pub use arch_optimal::*;
38pub(crate) use portable::packed_arithmetic::{interleave_mask_even, interleave_with_mask};
39pub use portable::{
40 packed::PackedPrimitiveType, packed_1, packed_2, packed_4, packed_8, packed_16, packed_32,
41 packed_64, packed_aes_8, packed_aes_16, packed_aes_32, packed_aes_64,
42};
43pub use strategies::*;