From 32aca6f3df99406111200537d7ae47b7524710f9 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Tue, 23 Jul 2024 09:33:40 +0200 Subject: [PATCH] re-enable ` count_operations` --- src/pystencils/sympyextensions/math.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pystencils/sympyextensions/math.py b/src/pystencils/sympyextensions/math.py index 108f6d2bd..6f99be7ef 100644 --- a/src/pystencils/sympyextensions/math.py +++ b/src/pystencils/sympyextensions/math.py @@ -549,8 +549,6 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr], List[Assignment]], Returns: dict with 'adds', 'muls' and 'divs' keys """ - raise NotImplementedError("count_operations is currently out of order.") - from pystencils.sympyextensions.fast_approximation import fast_sqrt, fast_inv_sqrt, fast_division result = {'adds': 0, 'muls': 0, 'divs': 0, 'sqrts': 0, @@ -567,9 +565,6 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr], List[Assignment]], def check_type(e): if only_type is None: return True - # FIXME nbackend - # if isinstance(e, FieldPointerSymbol) and only_type == "real": - # return only_type == "int" try: # base_type = get_type_of_expression(e) -- GitLab