mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
chore(core_crypto): enable the choice of a single fixed fft algorithm
This commit is contained in:
@@ -68,6 +68,7 @@ internal-keycache = ["lazy_static", "fs2", "bincode"]
|
||||
# Experimental section
|
||||
experimental = ["experimental-multi_bit_pbs"]
|
||||
experimental-multi_bit_pbs = []
|
||||
experimental-force_fft_algo_dif4 = []
|
||||
# End experimental section
|
||||
|
||||
__c_api = ["cbindgen", "bincode"]
|
||||
|
||||
@@ -153,10 +153,26 @@ impl Fft {
|
||||
|
||||
plan.map(|p| {
|
||||
p.get_or_init(|| {
|
||||
Arc::new((
|
||||
Twisties::new(n / 2),
|
||||
Plan::new(n / 2, Method::Measure(Duration::from_millis(10))),
|
||||
))
|
||||
#[cfg(not(feature = "experimental-force_fft_algo_dif4"))]
|
||||
{
|
||||
Arc::new((
|
||||
Twisties::new(n / 2),
|
||||
Plan::new(n / 2, Method::Measure(Duration::from_millis(10))),
|
||||
))
|
||||
}
|
||||
#[cfg(feature = "experimental-force_fft_algo_dif4")]
|
||||
{
|
||||
Arc::new((
|
||||
Twisties::new(n / 2),
|
||||
Plan::new(
|
||||
n / 2,
|
||||
Method::UserProvided {
|
||||
base_algo: concrete_fft::ordered::FftAlgo::Dif4,
|
||||
base_n: n / 2,
|
||||
},
|
||||
),
|
||||
))
|
||||
}
|
||||
})
|
||||
.clone()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user