Skip to content

Commit

Permalink
Add details to equality and cardio
Browse files Browse the repository at this point in the history
  • Loading branch information
jellevos committed Jan 29, 2025
1 parent b0810e8 commit 5ef37e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

circuit = Circuit([x == y])

for d, s, arith in circuit.arithmetize_depth_aware(0.75):
print(d, s, arith.multiplicative_cost(0.75), arith.run_using_helib(10, True, False, x=13, y=19))
for d, c, arith in circuit.arithmetize_depth_aware(0.75):
print(d, c, arith.run_using_helib(10, True, False, x=13, y=19))

arith = circuit.arithmetize('naive')
print('square and multiply', arith.multiplicative_depth(), arith.multiplicative_size(), arith.multiplicative_cost(0.75), arith.run_using_helib(10, True, False, x=13, y=19))
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

for depth, cost, arithmetic_circuit in front:
print(depth, cost)
# print('params', arithmetic_circuit.generate_code("temp.cpp", 10, True, False))
arithmetic_circuit.to_graph(f"cardio_arith_d{depth}_c{cost}.dot")

print(f"--- Cardio elevated risk assessment ({cost_of_squaring}) ---")
Expand All @@ -32,4 +33,5 @@

for depth, cost, arithmetic_circuit in front:
print(depth, cost)
# print('params', arithmetic_circuit.generate_code("temp.cpp", 10, True, False))
arithmetic_circuit.to_graph(f"cardio_elevated_arith_d{depth}_c{cost}.dot")

0 comments on commit 5ef37e2

Please sign in to comment.