Skip to content
Snippets Groups Projects
Commit f278b444 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fix in operation counting - FLOPs inside division were not counted

parent d49f555a
No related merge requests found
...@@ -503,7 +503,7 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr]], ...@@ -503,7 +503,7 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr]],
result['fast_div'] += 1 result['fast_div'] += 1
elif t.func is sp.Pow: elif t.func is sp.Pow:
if check_type(t.args[0]): if check_type(t.args[0]):
visit_children = False visit_children = True
if t.exp.is_integer and t.exp.is_number: if t.exp.is_integer and t.exp.is_number:
if t.exp >= 0: if t.exp >= 0:
result['muls'] += int(t.exp) - 1 result['muls'] += int(t.exp) - 1
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment