mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-07 22:04:10 -05:00
chore: uses if_then_zero only in HPU ERC20 whitepaper (to be updated when encrypt_trivial becomes available on HPU), adds test of if_then_zero for both CPU & HPU
This commit is contained in:
committed by
Pierre Gardrat
parent
122ef489fd
commit
d2a570bdd6
@@ -34,12 +34,12 @@ where
|
||||
{
|
||||
let has_enough_funds = (from_amount).ge(amount);
|
||||
let amount_to_transfer = {
|
||||
#[cfg(feature = "gpu")]
|
||||
#[cfg(not(feature = "hpu"))]
|
||||
{
|
||||
let zero_amount = FheType::encrypt_trivial(0u64);
|
||||
has_enough_funds.select(amount, &zero_amount)
|
||||
}
|
||||
#[cfg(not(feature = "gpu"))]
|
||||
#[cfg(feature = "hpu")]
|
||||
{
|
||||
has_enough_funds.if_then_zero(amount)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user