Skip to main content

provekit_skyscraper/
lib.rs

1#![feature(portable_simd)]
2#![feature(const_unsigned_bigint_helpers)]
3
4pub mod arithmetic;
5pub mod bar;
6pub mod constants;
7pub mod generic;
8pub mod pow;
9pub mod reduce;
10pub mod reference;
11pub mod simple;
12pub mod v1;
13
14#[cfg(target_arch = "aarch64")]
15pub mod block3;
16#[cfg(target_arch = "aarch64")]
17pub mod block4;
18
19/// The least common multiple of the implementation widths.
20///
21/// Doing this many compressions in parallel will make optimal use of resources
22/// in all implementations.
23///
24/// Note you might want to pick a multiple as block size to amortize the setting
25/// of rounding mode.
26pub const WIDTH_LCM: usize = 12;
27
28pub type CompressManyFn = fn(&[u8], &mut [u8]);
29
30// TODO: Some autotune method that does a small benchmark on target hardware and
31// finds the optimal implementation. It should also have an enum that can be
32// stored in a file. And the benchmarking should be instrumented.