Skip to content
Snippets Groups Projects
Commit c109ac02 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Remove show_code_debug (DebugFrameworkPrinter is a hack!)

parent 83046199
No related merge requests found
......@@ -8,7 +8,7 @@ from pystencils_autodiff._autodiff import (
AutoDiffAstPair, AutoDiffBoundaryHandling, AutoDiffOp, DiffModes, create_backward_assignments,
get_jacobian_of_assignments)
from pystencils_autodiff.field_tensor_conversion import ArrayWrapper, coerce_to_field
from pystencils_autodiff.framework_integration.printer import show_code, show_code_debug
from pystencils_autodiff.framework_integration.printer import show_code
__all__ = ['backends',
'AdjointField',
......@@ -21,8 +21,7 @@ __all__ = ['backends',
'AutoDiffBoundaryHandling',
'ArrayWrapper',
'coerce_to_field',
'show_code',
'show_code_debug']
'show_code']
sys.modules['pystencils.autodiff'] = pystencils_autodiff
sys.modules['pystencils.autodiff.backends'] = pystencils_autodiff.backends
......@@ -119,7 +119,7 @@ class FrameworkIntegrationPrinter(pystencils.backends.cbackend.CBackend):
def _print_Timeloop(self, node):
children_string = '\n '.join(self._print(c) for c in node.children)
return f"""for( {node.loop_symbol.dtype} {node.loop_symbol}={node.loop_start}; {node.loop_symbol}<= {node.loop_end} ; {node.loop_symbol}+= {node.loop_increment} ) {{
return f"""for( {node.loop_symbol.dtype} {node.loop_symbol}={node.loop_start}; {node.loop_symbol}<= {node.loop_end} ; {node.loop_symbol} += {node.loop_increment} ) {{
{children_string}
}}""" # noqa
......@@ -171,4 +171,3 @@ class DebugFrameworkPrinter(FrameworkIntegrationPrinter):
show_code = functools.partial(pystencils.show_code, custom_backend=FrameworkIntegrationPrinter())
show_code_debug = functools.partial(pystencils.show_code, custom_backend=DebugFrameworkPrinter())
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