feat(hpu): Enable some erc20 impl

With the support of overflowing ops, those impl are now available to Hpu
This commit is contained in:
Baptiste Roux
2025-05-28 18:15:03 +02:00
committed by B. Roux
parent 24d581afeb
commit 96c8c44c71

View File

@@ -122,7 +122,6 @@ where
/// This ones uses both overflowing_add/sub to check that both
/// the sender has enough funds, and the receiver will not overflow its balance
#[cfg(not(feature = "hpu"))]
fn transfer_safe<FheType>(
from_amount: &FheType,
to_amount: &FheType,
@@ -756,6 +755,14 @@ fn main() {
"whitepaper",
transfer_whitepaper::<FheUint64>,
);
bench_transfer_latency(
&mut group,
&cks,
bench_name,
"FheUint64",
"transfer::safe",
transfer_safe::<FheUint64>,
);
// Erc20 optimized instruction only available on Hpu
bench_transfer_latency(
&mut group,
@@ -779,6 +786,14 @@ fn main() {
"whitepaper",
transfer_whitepaper::<FheUint64>,
);
hpu_bench_transfer_throughput(
&mut group,
&cks,
bench_name,
"FheUint64",
"transfer::safe",
transfer_safe::<FheUint64>,
);
// Erc20 optimized instruction only available on Hpu
hpu_bench_transfer_throughput(
&mut group,