mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-15 07:05:09 -05:00
fix(rust): fix hardcoded array size
This commit is contained in:
@@ -5,9 +5,9 @@ def print_curve(data):
|
||||
|
||||
|
||||
def print_rust_curves_declaration(datas):
|
||||
print("[")
|
||||
print(f"const SECURITY_WEIGHTS_ARRAY: [(u64, SecurityWeights); {len(datas)}] = [")
|
||||
for data in datas:
|
||||
print_curve(data)
|
||||
print("]")
|
||||
print("];")
|
||||
|
||||
print_rust_curves_declaration(json.load(sys.stdin))
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
const SECURITY_WEIGHTS_ARRAY: [(u64, SecurityWeights); 4] = [
|
||||
(80, SecurityWeights { slope: -0.0404263311936459, bias: 1.660978864143658, minimal_lwe_dimension: 450 }),
|
||||
(112, SecurityWeights { slope: -0.02967013708113588, bias: 2.16246371408387, minimal_lwe_dimension: 450 }),
|
||||
(128, SecurityWeights { slope: -0.026405028765226296, bias: 2.482642269104389, minimal_lwe_dimension: 450 }),
|
||||
(192, SecurityWeights { slope: -0.018610403247590064, bias: 3.2996236848399008, minimal_lwe_dimension: 606 }),
|
||||
]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const SECURITY_WEIGHTS_ARRAY: [(u64, SecurityWeights); 4] = include!("./curves.gen.rs");
|
||||
include!("./curves.gen.rs");
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct SecurityWeights {
|
||||
|
||||
Reference in New Issue
Block a user