diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py index fd801870b6898c67426abc993b10069120dabb95..95ca58e42c2eed4b00d9ad230f22b483230127d8 100644 --- a/pystencils/backends/cbackend.py +++ b/pystencils/backends/cbackend.py @@ -16,13 +16,14 @@ from pystencils.integer_functions import bitwise_xor, bit_shift_right, bit_shift bitwise_or, modulo_ceil from pystencils.astnodes import Node, KernelFunction from pystencils.data_types import create_type, PointerType, get_type_of_expression, VectorType, cast_func, \ - vector_memory_access, reinterpret_cast_func, get_base_type + vector_memory_access, reinterpret_cast_func __all__ = ['generate_c', 'CustomCodeNode', 'PrintNode', 'get_headers', 'CustomSympyPrinter'] KERNCRAFT_NO_TERNARY_MODE = False + def generate_c(ast_node: Node, signature_only: bool = False, dialect='c') -> str: """Prints an abstract syntax tree node as C or CUDA code.