Skip to main content

p3_mersenne_31/
lib.rs

1//! The prime field `F_p` where `p = 2^31 - 1`.
2
3#![no_std]
4
5extern crate alloc;
6
7mod complex;
8mod dft;
9mod extension;
10mod mds;
11mod mersenne_31;
12mod poseidon1;
13mod poseidon2;
14mod qm31;
15mod radix_2_dit;
16
17pub use dft::Mersenne31Dft;
18pub use mds::*;
19pub use mersenne_31::*;
20pub use poseidon1::*;
21pub use poseidon2::*;
22pub use qm31::*;
23pub use radix_2_dit::Mersenne31ComplexRadix2Dit;
24
25#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
26mod aarch64_neon;
27#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
28pub use aarch64_neon::*;
29
30#[cfg(all(
31    target_arch = "x86_64",
32    target_feature = "avx2",
33    not(target_feature = "avx512f")
34))]
35mod x86_64_avx2;
36#[cfg(all(
37    target_arch = "x86_64",
38    target_feature = "avx2",
39    not(target_feature = "avx512f")
40))]
41pub use x86_64_avx2::*;
42
43#[cfg(all(target_arch = "x86_64", target_feature = "avx512f"))]
44mod x86_64_avx512;
45#[cfg(all(target_arch = "x86_64", target_feature = "avx512f"))]
46pub use x86_64_avx512::*;
47
48#[cfg(not(any(
49    all(target_arch = "aarch64", target_feature = "neon"),
50    all(target_arch = "x86_64", target_feature = "avx2",),
51)))]
52mod no_packing;
53#[cfg(not(any(
54    all(target_arch = "aarch64", target_feature = "neon"),
55    all(target_arch = "x86_64", target_feature = "avx2",),
56)))]
57pub use no_packing::*;