gt4py.cartesian.gtc.gtcpp package
Submodules
gt4py.cartesian.gtc.gtcpp.gtcpp module
- class gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, name: Any, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, offset: Union[gt4py.cartesian.gtc.common.CartesianOffset, gt4py.cartesian.gtc.common.VariableKOffsetT], data_index: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr] = NOTHING)[source]
Bases:
gt4py.cartesian.gtc.common.FieldAccess__Expr_VariableKOffset
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
,gt4py.cartesian.gtc.gtcpp.gtcpp.VariableKOffset
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.ApiParamDecl(*args: Any, **kwargs: Any)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Arg(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.AssignStmt(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, right: gt4py.cartesian.gtc.gtcpp.gtcpp.Expr, left: gt4py.cartesian.gtc.common.TargetT)[source]
Bases:
gt4py.cartesian.gtc.common.AssignStmt__union_gt4py_cartesian_gtc_gtcpp_gtcpp_localaccess_gt4py_cartesian_gtc_gtcpp_gtcpp_accessorref_Expr
[Union
[gt4py.cartesian.gtc.gtcpp.gtcpp.LocalAccess
,gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt
- left: gt4py.cartesian.gtc.common.TargetT
- no_horizontal_offset_in_assignment(attribute: attr._make.Attribute, value: Union[gt4py.cartesian.gtc.gtcpp.gtcpp.LocalAccess, gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef]) None [source]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.AxisLength(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, axis: int)[source]
Bases:
gt4py.cartesian.gtc.gtcpp.gtcpp.ComputationDecl
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.BinaryOp(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, op: Union[gt4py.cartesian.gtc.common.ArithmeticOperator, gt4py.cartesian.gtc.common.ComparisonOperator, gt4py.cartesian.gtc.common.LogicalOperator], left: gt4py.cartesian.gtc.common.ExprT, right: gt4py.cartesian.gtc.gtcpp.gtcpp.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.BinaryOp__Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.BlockStmt(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, body: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt])[source]
Bases:
gt4py.cartesian.gtc.common.BlockStmt__Stmt
[gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt
],gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Cache(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Cast(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType, expr: gt4py.cartesian.gtc.gtcpp.gtcpp.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.Cast__Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.ComputationDecl(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- dtype = 14
- kind = 1
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Expr(*args: typing_extensions.Any, **kwargs: typing_extensions.Any)[source]
Bases:
gt4py.cartesian.gtc.common.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.FieldDecl(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, dtype: gt4py.cartesian.gtc.common.DataType, dimensions: Tuple[bool, bool, bool], data_dims: Tuple[int, ...] = NOTHING)[source]
Bases:
gt4py.cartesian.gtc.gtcpp.gtcpp.ApiParamDecl
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTAccessor(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, id: int, intent: gt4py.cartesian.gtc.gtcpp.gtcpp.Intent, extent: gt4py.cartesian.gtc.gtcpp.gtcpp.GTExtent, ndim: int = 3)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTApplyMethod(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, interval: gt4py.cartesian.gtc.gtcpp.gtcpp.GTInterval, body: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt], local_variables: List[gt4py.cartesian.gtc.gtcpp.gtcpp.LocalVarDecl])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- body: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt]
- local_variables: List[gt4py.cartesian.gtc.gtcpp.gtcpp.LocalVarDecl]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTComputationCall(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, arguments: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Arg], extra_decls: List[gt4py.cartesian.gtc.gtcpp.gtcpp.ComputationDecl], temporaries: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary], multi_stages: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTMultiStage])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
,gt4py.eve.traits.SymbolTableTrait
- arguments: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Arg]
- extra_decls: List[gt4py.cartesian.gtc.gtcpp.gtcpp.ComputationDecl]
- multi_stages: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTMultiStage]
- temporaries: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTExtent(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, i: Tuple[int, int], j: Tuple[int, int], k: Tuple[int, int])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- classmethod zero() gt4py.cartesian.gtc.gtcpp.gtcpp.GTExtent [source]
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTFunctor(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, applies: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTApplyMethod], param_list: gt4py.cartesian.gtc.gtcpp.gtcpp.GTParamList)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
,gt4py.eve.traits.SymbolTableTrait
- applies: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTApplyMethod]
- param_list: gt4py.cartesian.gtc.gtcpp.gtcpp.GTParamList
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTInterval(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, from_level: gt4py.cartesian.gtc.gtcpp.gtcpp.GTLevel, to_level: gt4py.cartesian.gtc.gtcpp.gtcpp.GTLevel)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- from_level: gt4py.cartesian.gtc.gtcpp.gtcpp.GTLevel
- to_level: gt4py.cartesian.gtc.gtcpp.gtcpp.GTLevel
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTLevel(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, splitter: int, offset: int)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- offset_must_not_be_zero(attribute: attr._make.Attribute, value: int) None [source]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTMultiStage(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, loop_order: gt4py.cartesian.gtc.common.LoopOrder, stages: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTStage], caches: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Cache])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- caches: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Cache]
- loop_order: gt4py.cartesian.gtc.common.LoopOrder
- stages: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTStage]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTParamList(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, accessors: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTAccessor])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- accessors: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTAccessor]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GTStage(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, functor: Any, args: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Arg])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- args: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Arg]
- functor: gt4py.eve.concepts.SymbolRef
- has_args(attribute: attr._make.Attribute, value: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Arg]) None [source]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.GlobalParamDecl(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, dtype: gt4py.cartesian.gtc.common.DataType)[source]
Bases:
gt4py.cartesian.gtc.gtcpp.gtcpp.ApiParamDecl
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.IJCache(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any)[source]
Bases:
gt4py.cartesian.gtc.gtcpp.gtcpp.Cache
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.IfStmt(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, cond: gt4py.cartesian.gtc.common.ExprT, true_branch: gt4py.cartesian.gtc.common.StmtT, false_branch: Optional[gt4py.cartesian.gtc.gtcpp.gtcpp.BlockStmt] = None)[source]
Bases:
gt4py.cartesian.gtc.common.IfStmt__BlockStmt_Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.BlockStmt
,gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Intent(value)[source]
Bases:
gt4py.eve.type_definitions.StrEnum
An enumeration.
- IN = 'in'
- INOUT = 'inout'
- class gt4py.cartesian.gtc.gtcpp.gtcpp.KCache(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, fill: bool, flush: bool)[source]
Bases:
gt4py.cartesian.gtc.gtcpp.gtcpp.Cache
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Literal(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, value: Union[gt4py.cartesian.gtc.common.BuiltInLiteral, str], dtype: gt4py.cartesian.gtc.common.DataType, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.SCALAR)[source]
Bases:
gt4py.cartesian.gtc.common.Literal
,gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.LocalAccess(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, name: Any, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.SCALAR)[source]
Bases:
gt4py.cartesian.gtc.common.ScalarAccess
,gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.LocalVarDecl(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: gt4py.eve.concepts.SymbolName, dtype: gt4py.cartesian.gtc.common.DataType)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.NativeFuncCall(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, func: gt4py.cartesian.gtc.common.NativeFunction, args: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr])[source]
Bases:
gt4py.cartesian.gtc.common.NativeFuncCall__Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Offset(*, i: int, j: int, k: int)[source]
Bases:
gt4py.cartesian.gtc.common.CartesianOffset
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Positional(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, axis_name: str)[source]
Bases:
gt4py.cartesian.gtc.gtcpp.gtcpp.ComputationDecl
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Program(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: str, parameters: List[gt4py.cartesian.gtc.gtcpp.gtcpp.ApiParamDecl], functors: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTFunctor], gt_computation: gt4py.cartesian.gtc.gtcpp.gtcpp.GTComputationCall)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
,gt4py.eve.traits.ValidatedSymbolTableTrait
- functors: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTFunctor]
- gt_computation: gt4py.cartesian.gtc.gtcpp.gtcpp.GTComputationCall
- parameters: List[gt4py.cartesian.gtc.gtcpp.gtcpp.ApiParamDecl]
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt(*args: typing_extensions.Any, **kwargs: typing_extensions.Any)[source]
Bases:
gt4py.cartesian.gtc.common.Stmt
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, name: Any, dtype: gt4py.cartesian.gtc.common.DataType, data_dims: Tuple[int, ...] = NOTHING)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.TernaryOp(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, cond: gt4py.cartesian.gtc.common.ExprT, true_expr: gt4py.cartesian.gtc.common.ExprT, false_expr: gt4py.cartesian.gtc.gtcpp.gtcpp.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.TernaryOp__Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.UnaryOp(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, op: gt4py.cartesian.gtc.common.UnaryOperator, expr: gt4py.cartesian.gtc.gtcpp.gtcpp.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.UnaryOp__Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.VariableKOffset(*, k: gt4py.cartesian.gtc.gtcpp.gtcpp.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.VariableKOffset__Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
]- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
- class gt4py.cartesian.gtc.gtcpp.gtcpp.While(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, cond: gt4py.cartesian.gtc.common.ExprT, body: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt])[source]
Bases:
gt4py.cartesian.gtc.common.While__Stmt_Expr
[gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt
,gt4py.cartesian.gtc.gtcpp.gtcpp.Expr
],gt4py.cartesian.gtc.gtcpp.gtcpp.Stmt
- classmethod update_forward_refs(localns: Optional[dict[str, typing_extensions.Any]] = None) type[_DataModelT]
Update Data Model class meta-information replacing forwarded type annotations with actual types.
- Parameters
localns – locals
dict
used in the evaluation of the annotations (globals are automatically taken frommodel.__module__
).- Returns
The provided class (so it can be used as a decorator too).
gt4py.cartesian.gtc.gtcpp.gtcpp_codegen module
- class gt4py.cartesian.gtc.gtcpp.gtcpp_codegen.GTCppCodegen[source]
Bases:
gt4py.eve.codegen.TemplatedGenerator
,gt4py.eve.traits.VisitorWithSymbolTableTrait
- ApiParamDecl = <gt4py.eve.codegen.FormatTemplate object>
- Arg = <gt4py.eve.codegen.FormatTemplate object>
- AssignStmt = <gt4py.eve.codegen.FormatTemplate object>
- AxisLength = <gt4py.eve.codegen.FormatTemplate object>
- BinaryOp = <gt4py.eve.codegen.FormatTemplate object>
- BlockStmt = <gt4py.eve.codegen.MakoTemplate object>
- Cast = <gt4py.eve.codegen.FormatTemplate object>
- DATA_TYPE_TO_CODE = {DataType.BOOL: 'bool', DataType.INT8: 'std::int8_t', DataType.INT16: 'std::int16_t', DataType.INT32: 'std::int32_t', DataType.INT64: 'std::int64_t', DataType.FLOAT32: 'float', DataType.FLOAT64: 'double'}
- GTAccessor = <gt4py.eve.codegen.FormatTemplate object>
- GTApplyMethod = <gt4py.eve.codegen.MakoTemplate object>
- GTComputationCall = <gt4py.eve.codegen.MakoTemplate object>
- GTExtent = <gt4py.eve.codegen.FormatTemplate object>
- GTFunctor = <gt4py.eve.codegen.MakoTemplate object>
- GTInterval = <gt4py.eve.codegen.FormatTemplate object>
- GTLevel = <gt4py.eve.codegen.FormatTemplate object>
- GTMultiStage = <gt4py.eve.codegen.MakoTemplate object>
- GTParamList = <gt4py.eve.codegen.MakoTemplate object>
- GTStage = <gt4py.eve.codegen.MakoTemplate object>
- IJCache = <gt4py.eve.codegen.FormatTemplate object>
- IfStmt = <gt4py.eve.codegen.MakoTemplate object>
- KCache = <gt4py.eve.codegen.MakoTemplate object>
- LocalAccess = <gt4py.eve.codegen.FormatTemplate object>
- LocalVarDecl = <gt4py.eve.codegen.FormatTemplate object>
- NativeFuncCall = <gt4py.eve.codegen.MakoTemplate object>
- Positional = <gt4py.eve.codegen.FormatTemplate object>
- Program = <gt4py.eve.codegen.MakoTemplate object>
- TernaryOp = <gt4py.eve.codegen.FormatTemplate object>
- UNARY_OPERATOR_TO_CODE = {UnaryOperator.POS: '+', UnaryOperator.NEG: '-', UnaryOperator.NOT: '!'}
- UnaryOp = <gt4py.eve.codegen.FormatTemplate object>
- While = <gt4py.eve.codegen.MakoTemplate object>
- classmethod apply(root: Union[gt4py.eve.concepts.NodeT, bool, bytes, int, float, str, enum.IntEnum, gt4py.eve.type_definitions.StrEnum], **kwargs: Any) str [source]
Public method to build a class instance and visit an IR node.
- Parameters
root – An IR node.
node_templates (optiona) – see
NodeDumper
.dump_function (optiona) – see
NodeDumper
.**kwargs (optional) – custom extra parameters forwarded to visit_NODE_TYPE_NAME().
- Returns
String (or collection of strings) with the dumped version of the root IR node.
- visit_AccessorRef(accessor_ref: gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef, *, symtable: Dict[str, gt4py.cartesian.gtc.gtcpp.gtcpp.GTAccessor], temp_decls: Optional[Dict[str, gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary]] = None, **kwargs: Any)[source]
- visit_BuiltInLiteral(builtin: gt4py.cartesian.gtc.common.BuiltInLiteral, **kwargs: Any) str [source]
- visit_DataType(dtype: gt4py.cartesian.gtc.common.DataType, **kwargs: Any) str [source]
- visit_GTComputationCall(node: gt4py.cartesian.gtc.gtcpp.gtcpp.GTComputationCall, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_Literal(node: gt4py.cartesian.gtc.gtcpp.gtcpp.Literal, *, in_data_index: bool = False, **kwargs: Any) str [source]
- visit_LoopOrder(looporder: gt4py.cartesian.gtc.common.LoopOrder, **kwargs: Any) str [source]
- visit_NativeFunction(func: gt4py.cartesian.gtc.common.NativeFunction, **kwargs: Any) str [source]
- visit_Program(node: gt4py.cartesian.gtc.gtcpp.gtcpp.Program, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_Temporary(node: gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary, **kwargs: Any) str [source]
gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp module
- class gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.OIRToGTCpp[source]
Bases:
gt4py.eve.visitors.NodeTranslator
,gt4py.eve.traits.VisitorWithSymbolTableTrait
- class GTComputationContext(create_symbol_name: gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.SymbolNameCreator, temporaries: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary] = <factory>, positionals: Dict[int, gt4py.cartesian.gtc.gtcpp.gtcpp.Positional] = <factory>, axis_lengths: Dict[int, gt4py.cartesian.gtc.gtcpp.gtcpp.AxisLength] = <factory>, _arguments: Set[str] = <factory>)[source]
Bases:
object
- add_arguments(arguments: Set[str]) gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.OIRToGTCpp.GTComputationContext [source]
- add_temporaries(temporaries: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary]) gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.OIRToGTCpp.GTComputationContext [source]
- property arguments: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Arg]
- axis_lengths: Dict[int, gt4py.cartesian.gtc.gtcpp.gtcpp.AxisLength]
- create_symbol_name: gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.SymbolNameCreator
- property extra_decls: List[gt4py.cartesian.gtc.gtcpp.gtcpp.ComputationDecl]
- make_length(axis: int) gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef [source]
- make_positional(axis: int) gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef [source]
- positionals: Dict[int, gt4py.cartesian.gtc.gtcpp.gtcpp.Positional]
- temporaries: List[gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary]
- class ProgramContext(functors: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTFunctor] = <factory>)[source]
Bases:
object
- add_functor(functor: gt4py.cartesian.gtc.gtcpp.gtcpp.GTFunctor) gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.OIRToGTCpp.ProgramContext [source]
- functors: List[gt4py.cartesian.gtc.gtcpp.gtcpp.GTFunctor]
- visit_AssignStmt(node: gt4py.cartesian.gtc.oir.AssignStmt, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.AssignStmt [source]
- visit_AxisBound(node: gt4py.cartesian.gtc.common.AxisBound, *, is_start: bool, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.GTLevel [source]
- visit_BinaryOp(node: gt4py.cartesian.gtc.oir.BinaryOp, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.BinaryOp [source]
- visit_Cast(node: gt4py.cartesian.gtc.oir.Cast, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.Cast [source]
- visit_FieldAccess(node: gt4py.cartesian.gtc.oir.FieldAccess, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef [source]
- visit_FieldDecl(node: gt4py.cartesian.gtc.oir.FieldDecl, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.FieldDecl [source]
- visit_HorizontalExecution(node: gt4py.cartesian.gtc.oir.HorizontalExecution, *, prog_ctx: ProgramContext, comp_ctx: GTComputationContext, interval: gt4py.cartesian.gtc.gtcpp.gtcpp.GTInterval, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.GTStage [source]
- visit_HorizontalRestriction(node: gt4py.cartesian.gtc.oir.HorizontalRestriction, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.IfStmt [source]
- visit_IJCache(node: gt4py.cartesian.gtc.oir.IJCache, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.IJCache [source]
- visit_Interval(node: gt4py.cartesian.gtc.oir.Interval, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.GTInterval [source]
- visit_KCache(node: gt4py.cartesian.gtc.oir.KCache, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.KCache [source]
- visit_Literal(node: gt4py.cartesian.gtc.oir.Literal, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.Literal [source]
- visit_LocalScalar(node: gt4py.cartesian.gtc.oir.LocalScalar, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.LocalVarDecl [source]
- visit_MaskStmt(node: gt4py.cartesian.gtc.oir.MaskStmt, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.IfStmt [source]
- visit_NativeFuncCall(node: gt4py.cartesian.gtc.oir.NativeFuncCall, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.NativeFuncCall [source]
- visit_ScalarAccess(node: gt4py.cartesian.gtc.oir.ScalarAccess, **kwargs: Any) Union[gt4py.cartesian.gtc.gtcpp.gtcpp.AccessorRef, gt4py.cartesian.gtc.gtcpp.gtcpp.LocalAccess] [source]
- visit_ScalarDecl(node: gt4py.cartesian.gtc.oir.ScalarDecl, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.GlobalParamDecl [source]
- visit_Stencil(node: gt4py.cartesian.gtc.oir.Stencil, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.Program [source]
- visit_Temporary(node: gt4py.cartesian.gtc.oir.Temporary, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.Temporary [source]
- visit_TernaryOp(node: gt4py.cartesian.gtc.oir.TernaryOp, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.TernaryOp [source]
- visit_UnaryOp(node: gt4py.cartesian.gtc.oir.UnaryOp, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.UnaryOp [source]
- visit_VariableKOffset(node: gt4py.cartesian.gtc.oir.VariableKOffset, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.VariableKOffset [source]
- visit_VerticalLoop(node: gt4py.cartesian.gtc.oir.VerticalLoop, *, comp_ctx: gt4py.cartesian.gtc.gtcpp.oir_to_gtcpp.OIRToGTCpp.GTComputationContext, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.GTMultiStage [source]
- visit_While(node: gt4py.cartesian.gtc.oir.While, **kwargs: Any) gt4py.cartesian.gtc.gtcpp.gtcpp.While [source]