mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
feat(hpu): Enable some erc20 impl
With the support of overflowing ops, those impl are now available to Hpu
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user