gt4py.cartesian.gtc.debug package

Submodules

gt4py.cartesian.gtc.debug.debug_codegen module

class gt4py.cartesian.gtc.debug.debug_codegen.DebugCodeGen[source]

Bases: VisitorWithSymbolTableTrait

_node_visitor_cache_: ClassVar[dict[type, str] | None] = {}

Cache for visitor method names per node class to speed up dispatching. Note that we cache the visitor method name, not the bound method itself, to avoid implicitly caching the visitor state, which could lead to unexpected behavior.

create_k_loop_code(section: VerticalLoopSection, loop: VerticalLoop, symtable: Mapping[str, FieldDecl]) → Generator[source]
generate_field_decls(declarations: list[Decl]) → None[source]
generate_ij_loop(block_extents: dict[int, Extent], execution: HorizontalExecution) → Generator[source]
generate_imports() → None[source]
generate_run_function(stencil: Stencil) → None[source]
generate_stencil_code(stencil: Stencil, block_extents: dict[int, Extent], symtable: Mapping[str, FieldDecl]) → None[source]
generate_temp_decls(temporary_declarations: list[Temporary], field_extents: dict[str, Extent]) → None[source]
initial_declarations(stencil: Stencil, field_extents: dict[str, Extent]) → None[source]
visit_AbsoluteKIndex(absolute_k_index: AbsoluteKIndex, **kwargs) → str[source]
visit_AssignStmt(assignment_statement: AssignStmt, **kwargs) → None[source]
visit_AxisBound(axis_bound: AxisBound, **kwargs) → str[source]
visit_BinaryOp(binary: BinaryOp, **kwargs) → str[source]
visit_CacheDesc(cache_descriptor: CacheDesc, **_) → None[source]
visit_CartesianOffset(cartesian_offset: CartesianOffset, **kwargs) → str[source]
visit_Cast(cast: Cast, **kwargs) → str[source]
visit_DataType(data_type: DataType, **_) → str[source]
visit_FieldAccess(field_access: FieldAccess, *, symtable: Mapping[str, FieldDecl], **kwargs) → str[source]
visit_FieldDecl(field_decl: FieldDecl, **_) → str[source]
visit_HorizontalExecution(horizontal_execution: HorizontalExecution, **kwargs) → None[source]
visit_HorizontalInterval(horizontal_interval: HorizontalInterval, **kwargs) → tuple[str | None, str | None][source]
visit_HorizontalMask(horizontal_mask: HorizontalMask, **kwargs) → None[source]
visit_HorizontalRestriction(horizontal_restriction: HorizontalRestriction, **kwargs) → None[source]
visit_IJCache(ij_cache: IJCache, **_) → None[source]
visit_Interval(interval: Interval, **kwargs) → str[source]
visit_IteratorAccess(iterator_access: IteratorAccess, **_) → str[source]

Returns the axis in lower letter (to match the index of the loop)

visit_KCache(k_cache: KCache, **_) → None[source]
visit_Literal(literal: Literal, **_) → str[source]
visit_LocalScalar(local_scalar: LocalScalar, **__) → None[source]
visit_MaskStmt(mask_statement: MaskStmt, **kwargs) → None[source]
visit_NativeFuncCall(native_function_call: NativeFuncCall, **kwargs) → str[source]
visit_RuntimeAxisBound(axis_bound: RuntimeAxisBound, **kwargs) → str[source]
visit_ScalarAccess(scalar_access: ScalarAccess, **_) → str[source]
visit_ScalarDecl(scalar_declaration: ScalarDecl, **_) → str[source]
visit_Stencil(stencil: Stencil, symtable: Mapping[str, FieldDecl], **_) → str[source]
visit_SymbolRef(symbol_ref: SymbolRef) → str[source]
visit_Temporary(temporary_declaration: Temporary, **kwargs) → str[source]
visit_TernaryOp(ternary_operator: TernaryOp, **kwargs) → str[source]
visit_UnaryOp(unary_operator: UnaryOp, **kwargs) → str[source]
visit_UnboundedInterval(unbounded_interval: UnboundedInterval, **_) → None[source]
visit_VariableKOffset(variable_k_offset: VariableKOffset, **kwargs) → str[source]
visit_VerticalLoop() → None[source]
visit_VerticalLoopSection(vertical_loop_section: VerticalLoopSection, **_) → None[source]
visit_While(while_node: While, **kwargs) → None[source]
gt4py.cartesian.gtc.debug.debug_codegen.compute_extents(node: Stencil) → tuple[dict[str, Extent], dict[int, Extent]][source]

Module contents