gt4py.cartesian.gtc.numpy package
Submodules
gt4py.cartesian.gtc.numpy.npir module
- class gt4py.cartesian.gtc.numpy.npir.AxisName(value)[source]
Bases:
gt4py.eve.type_definitions.StrEnum
An enumeration.
- I = 'I'
- J = 'J'
- K = 'K'
- class gt4py.cartesian.gtc.numpy.npir.Broadcast(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, expr: gt4py.cartesian.gtc.numpy.npir.Expr, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.Computation(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, arguments: List[str], api_field_decls: List[gt4py.cartesian.gtc.numpy.npir.FieldDecl], param_decls: List[gt4py.cartesian.gtc.numpy.npir.ScalarDecl], temp_decls: List[gt4py.cartesian.gtc.numpy.npir.TemporaryDecl], vertical_passes: List[gt4py.cartesian.gtc.numpy.npir.VerticalPass])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
,gt4py.eve.traits.SymbolTableTrait
- api_field_decls: List[gt4py.cartesian.gtc.numpy.npir.FieldDecl]
- param_decls: List[gt4py.cartesian.gtc.numpy.npir.ScalarDecl]
- temp_decls: List[gt4py.cartesian.gtc.numpy.npir.TemporaryDecl]
- 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).
- vertical_passes: List[gt4py.cartesian.gtc.numpy.npir.VerticalPass]
- class gt4py.cartesian.gtc.numpy.npir.Decl(*args: typing_extensions.Any, **kwargs: typing_extensions.Any)[source]
Bases:
gt4py.eve.concepts.Node
- 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.numpy.npir.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.numpy.npir.FieldDecl(*, name: Any, dtype: gt4py.cartesian.gtc.common.DataType, dimensions: Tuple[bool, bool, bool], data_dims: Tuple[int, ...] = NOTHING, extent: gt4py.cartesian.gtc.definitions.Extent)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.Decl
General field shared across HorizontalBlocks.
- 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.numpy.npir.FieldSlice(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, name: Any, i_offset: int, j_offset: int, k_offset: Union[int, gt4py.cartesian.gtc.numpy.npir.VarKOffset], data_index: List[gt4py.cartesian.gtc.numpy.npir.Expr] = NOTHING, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.VectorLValue
- data_index: List[gt4py.cartesian.gtc.numpy.npir.Expr]
- data_indices_are_scalar(attribute: attr._make.Attribute, data_index: List[gt4py.cartesian.gtc.numpy.npir.Expr]) None [source]
- k_offset: Union[int, gt4py.cartesian.gtc.numpy.npir.VarKOffset]
- 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.numpy.npir.HorizontalBlock(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, body: List[gt4py.cartesian.gtc.numpy.npir.Stmt], extent: gt4py.cartesian.gtc.definitions.Extent, declarations: List[gt4py.cartesian.gtc.numpy.npir.LocalScalarDecl])[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
,gt4py.eve.traits.SymbolTableTrait
- body: List[gt4py.cartesian.gtc.numpy.npir.Stmt]
- declarations: List[gt4py.cartesian.gtc.numpy.npir.LocalScalarDecl]
- 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.numpy.npir.HorizontalMask(*, i: Tuple[gt4py.cartesian.gtc.common.AxisBound, gt4py.cartesian.gtc.common.AxisBound], j: Tuple[gt4py.cartesian.gtc.common.AxisBound, gt4py.cartesian.gtc.common.AxisBound])[source]
Bases:
gt4py.eve.concepts.Node
- 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.numpy.npir.LocalScalarAccess(*, 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)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.VectorLValue
- 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.numpy.npir.LocalScalarDecl(*, name: Any, dtype: gt4py.cartesian.gtc.common.DataType)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.Decl
Scalar per grid point.
Used for API scalar parameters. Local scalars never have data_dims.
- 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.numpy.npir.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.numpy.npir.Expr])[source]
Bases:
gt4py.cartesian.gtc.common.NativeFuncCall__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.ParamAccess(*, 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.numpy.npir.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.numpy.npir.ScalarCast(*, 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.numpy.npir.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.Cast__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.ScalarDecl(*, name: Any, dtype: gt4py.cartesian.gtc.common.DataType)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.Decl
Scalar per grid point.
Used for API scalar parameters. Local scalars never have data_dims.
- 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.numpy.npir.ScalarLiteral(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, value: Union[gt4py.cartesian.gtc.common.BuiltInLiteral, str], kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.SCALAR, dtype: gt4py.cartesian.gtc.common.DataType)[source]
Bases:
gt4py.cartesian.gtc.common.Literal
,gt4py.cartesian.gtc.numpy.npir.Expr
- is_defined(attribute: attr._make.Attribute, dtype: gt4py.cartesian.gtc.common.DataType) 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.numpy.npir.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.numpy.npir.TemporaryDecl(*, name: Any, dtype: gt4py.cartesian.gtc.common.DataType, data_dims: Tuple[int, ...] = NOTHING, offset: Tuple[int, int], padding: Tuple[int, int])[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.Decl
Temporary field shared across HorizontalBlocks.
- Parameters
offset (Origin of the temporary field.) –
padding (Buffer added to compute domain as field size.) –
- 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.numpy.npir.VarKOffset(*, k: gt4py.cartesian.gtc.numpy.npir.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.VariableKOffset__Expr
[gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.VectorArithmetic(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, left: gt4py.cartesian.gtc.common.ExprT, right: gt4py.cartesian.gtc.numpy.npir.Expr, op: Union[gt4py.cartesian.gtc.common.ArithmeticOperator, gt4py.cartesian.gtc.common.ComparisonOperator])[source]
Bases:
gt4py.cartesian.gtc.common.BinaryOp__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.Expr
- op: Union[gt4py.cartesian.gtc.common.ArithmeticOperator, gt4py.cartesian.gtc.common.ComparisonOperator]
- 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.numpy.npir.VectorAssign(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, left: gt4py.cartesian.gtc.common.TargetT, horizontal_mask: Optional[gt4py.cartesian.gtc.numpy.npir.HorizontalMask] = None, right: gt4py.cartesian.gtc.numpy.npir.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.AssignStmt__VectorLValue_Expr
[gt4py.cartesian.gtc.numpy.npir.VectorLValue
,gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.Stmt
- horizontal_mask: Optional[gt4py.cartesian.gtc.numpy.npir.HorizontalMask]
- right_is_field_kind(attribute: attr._make.Attribute, right: gt4py.cartesian.gtc.numpy.npir.Expr) 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.numpy.npir.VectorCast(*, 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.numpy.npir.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.Cast__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.VectorLValue(*args: typing_extensions.Any, **kwargs: typing_extensions.Any)[source]
Bases:
gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.VectorLogic(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, kind: gt4py.cartesian.gtc.common.ExprKind = ExprKind.FIELD, dtype: gt4py.cartesian.gtc.common.DataType = DataType.AUTO, left: gt4py.cartesian.gtc.common.ExprT, right: gt4py.cartesian.gtc.numpy.npir.Expr, op: gt4py.cartesian.gtc.common.LogicalOperator)[source]
Bases:
gt4py.cartesian.gtc.common.BinaryOp__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.VectorTernaryOp(*, 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.numpy.npir.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.TernaryOp__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.VectorUnaryOp(*, 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.numpy.npir.Expr)[source]
Bases:
gt4py.cartesian.gtc.common.UnaryOp__Expr
[gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir.VerticalPass(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, body: List[gt4py.cartesian.gtc.numpy.npir.HorizontalBlock], lower: gt4py.cartesian.gtc.common.AxisBound, upper: gt4py.cartesian.gtc.common.AxisBound, direction: gt4py.cartesian.gtc.common.LoopOrder)[source]
Bases:
gt4py.cartesian.gtc.common.LocNode
- body: List[gt4py.cartesian.gtc.numpy.npir.HorizontalBlock]
- direction: gt4py.cartesian.gtc.common.LoopOrder
- 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.numpy.npir.While(*, loc: Optional[gt4py.eve.concepts.SourceLocation] = None, cond: gt4py.cartesian.gtc.common.ExprT, body: List[gt4py.cartesian.gtc.numpy.npir.Stmt])[source]
Bases:
gt4py.cartesian.gtc.common.While__Stmt_Expr
[gt4py.cartesian.gtc.numpy.npir.Stmt
,gt4py.cartesian.gtc.numpy.npir.Expr
],gt4py.cartesian.gtc.numpy.npir.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.numpy.npir_codegen module
- class gt4py.cartesian.gtc.numpy.npir_codegen.NpirCodegen[source]
Bases:
gt4py.eve.codegen.TemplatedGenerator
,gt4py.eve.traits.VisitorWithSymbolTableTrait
- AxisBound = <gt4py.eve.codegen.FormatTemplate object>
- Broadcast = <gt4py.eve.codegen.FormatTemplate object>
- Computation = <gt4py.eve.codegen.JinjaTemplate object>
- FieldDecl = <gt4py.eve.codegen.FormatTemplate object>
- HorizontalBlock = <gt4py.eve.codegen.JinjaTemplate object>
- LocalScalarDecl = <gt4py.eve.codegen.FormatTemplate object>
- NativeFuncCall = <gt4py.eve.codegen.FormatTemplate object>
- ParamAccess = <gt4py.eve.codegen.FormatTemplate object>
- ScalarCast = <gt4py.eve.codegen.FormatTemplate object>
- VarKOffset = <gt4py.eve.codegen.FormatTemplate object>
- VectorArithmetic = <gt4py.eve.codegen.FormatTemplate object>
- VectorCast = <gt4py.eve.codegen.FormatTemplate object>
- VectorLogic = <gt4py.eve.codegen.FormatTemplate object>
- VectorTernaryOp = <gt4py.eve.codegen.FormatTemplate object>
- VectorUnaryOp = <gt4py.eve.codegen.FormatTemplate object>
- VerticalPass = <gt4py.eve.codegen.JinjaTemplate object>
- While = <gt4py.eve.codegen.JinjaTemplate object>
- visit_AxisBound(node: gt4py.cartesian.gtc.common.AxisBound, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_BuiltInLiteral(node: gt4py.cartesian.gtc.common.BuiltInLiteral, **kwargs) Union[str, Collection[str]] [source]
- visit_Computation(node: gt4py.cartesian.gtc.numpy.npir.Computation, *, ignore_np_errstate: bool = True, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_DataType(node: gt4py.cartesian.gtc.common.DataType, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_FieldSlice(node: gt4py.cartesian.gtc.numpy.npir.FieldSlice, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_HorizontalBlock(node: gt4py.cartesian.gtc.numpy.npir.HorizontalBlock, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_LevelMarker(node: gt4py.cartesian.gtc.common.LevelMarker, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_LocalScalarAccess(node: gt4py.cartesian.gtc.numpy.npir.LocalScalarAccess, *, is_serial: bool, horizontal_mask: Optional[gt4py.cartesian.gtc.numpy.npir.HorizontalMask] = None, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_LoopOrder(node: gt4py.cartesian.gtc.common.LoopOrder, **kwargs) Union[str, Collection[str]] [source]
- visit_NativeFuncCall(node: gt4py.cartesian.gtc.numpy.npir.NativeFuncCall, *, mask: Optional[str] = None, **kwargs: Any)[source]
- visit_NativeFunction(node: gt4py.cartesian.gtc.common.NativeFunction, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_ScalarLiteral(node: gt4py.cartesian.gtc.numpy.npir.ScalarLiteral, *, inside_slice: bool = False, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_TemporaryDecl(node: gt4py.cartesian.gtc.numpy.npir.TemporaryDecl, **kwargs) Union[str, Collection[str]] [source]
- visit_UnaryOperator(node: gt4py.cartesian.gtc.common.UnaryOperator, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_VectorAssign(node: gt4py.cartesian.gtc.numpy.npir.VectorAssign, *, ctx: BlockContext, **kwargs: Any) Union[str, Collection[str]] [source]
- visit_VerticalPass(node: gt4py.cartesian.gtc.numpy.npir.VerticalPass, **kwargs)[source]
- visit_While(node: gt4py.cartesian.gtc.numpy.npir.While, **kwargs: Any) str [source]
gt4py.cartesian.gtc.numpy.oir_to_npir module
- class gt4py.cartesian.gtc.numpy.oir_to_npir.OirToNpir[source]
Bases:
gt4py.eve.visitors.NodeTranslator
,gt4py.eve.traits.VisitorWithSymbolTableTrait
Lower from optimizable IR (OIR) to numpy IR (NPIR).
- visit_AssignStmt(node: gt4py.cartesian.gtc.oir.AssignStmt, *, mask: Optional[gt4py.cartesian.gtc.numpy.npir.Expr] = None, horizontal_mask: Optional[gt4py.cartesian.gtc.numpy.npir.HorizontalMask] = None, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.VectorAssign [source]
- visit_BinaryOp(node: gt4py.cartesian.gtc.oir.BinaryOp, **kwargs: Any) Union[gt4py.cartesian.gtc.numpy.npir.VectorArithmetic, gt4py.cartesian.gtc.numpy.npir.VectorLogic] [source]
- visit_CartesianOffset(node: gt4py.cartesian.gtc.common.CartesianOffset, **kwargs: Any) Tuple[int, int, int] [source]
- visit_Cast(node: gt4py.cartesian.gtc.oir.Cast, **kwargs: Any) Union[gt4py.cartesian.gtc.numpy.npir.VectorCast, gt4py.cartesian.gtc.numpy.npir.ScalarCast] [source]
- visit_FieldAccess(node: gt4py.cartesian.gtc.oir.FieldAccess, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.FieldSlice [source]
- visit_FieldDecl(node: gt4py.cartesian.gtc.oir.FieldDecl, *, field_extents: Dict[str, gt4py.cartesian.gtc.definitions.Extent], **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.FieldDecl [source]
- visit_HorizontalExecution(node: gt4py.cartesian.gtc.oir.HorizontalExecution, *, block_extents: Optional[Dict[int, gt4py.cartesian.gtc.definitions.Extent]] = None, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.HorizontalBlock [source]
- visit_HorizontalRestriction(node: gt4py.cartesian.gtc.oir.HorizontalRestriction, *, extent: gt4py.cartesian.gtc.definitions.Extent, **kwargs: Any) Any [source]
- visit_Literal(node: gt4py.cartesian.gtc.oir.Literal, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.ScalarLiteral [source]
- visit_LocalScalar(node: gt4py.cartesian.gtc.oir.LocalScalar, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.LocalScalarDecl [source]
- visit_MaskStmt(node: gt4py.cartesian.gtc.oir.MaskStmt, *, mask: Optional[gt4py.cartesian.gtc.numpy.npir.Expr] = None, **kwargs: Any) List[gt4py.cartesian.gtc.numpy.npir.Stmt] [source]
- visit_NativeFuncCall(node: gt4py.cartesian.gtc.oir.NativeFuncCall, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.NativeFuncCall [source]
- visit_ScalarAccess(node: gt4py.cartesian.gtc.oir.ScalarAccess, *, symtable: Dict[str, gt4py.cartesian.gtc.oir.Decl], **kwargs: Any) Union[gt4py.cartesian.gtc.numpy.npir.ParamAccess, gt4py.cartesian.gtc.numpy.npir.LocalScalarAccess] [source]
- visit_ScalarDecl(node: gt4py.cartesian.gtc.oir.ScalarDecl, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.ScalarDecl [source]
- visit_Stencil(node: gt4py.cartesian.gtc.oir.Stencil, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.Computation [source]
- visit_Temporary(node: gt4py.cartesian.gtc.oir.Temporary, *, field_extents: Dict[str, gt4py.cartesian.gtc.definitions.Extent], **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.TemporaryDecl [source]
- visit_TernaryOp(node: gt4py.cartesian.gtc.oir.TernaryOp, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.VectorTernaryOp [source]
- visit_UnaryOp(node: gt4py.cartesian.gtc.oir.UnaryOp, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.VectorUnaryOp [source]
- visit_VariableKOffset(node: gt4py.cartesian.gtc.oir.VariableKOffset, **kwargs: Any) Tuple[int, int, gt4py.eve.concepts.Node] [source]
- visit_VerticalLoop(node: gt4py.cartesian.gtc.oir.VerticalLoop, **kwargs: Any) List[gt4py.cartesian.gtc.numpy.npir.VerticalPass] [source]
- visit_VerticalLoopSection(node: gt4py.cartesian.gtc.oir.VerticalLoopSection, *, loop_order: gt4py.cartesian.gtc.common.LoopOrder, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.VerticalPass [source]
- visit_While(node: gt4py.cartesian.gtc.oir.While, *, mask: Optional[gt4py.cartesian.gtc.numpy.npir.Expr] = None, **kwargs: Any) gt4py.cartesian.gtc.numpy.npir.While [source]
gt4py.cartesian.gtc.numpy.scalars_to_temps module
An optimization to convert npir.LocalScalarDecl to npir.TemporaryDecl.
- class gt4py.cartesian.gtc.numpy.scalars_to_temps.ScalarsToTemporaries[source]
Bases:
gt4py.eve.visitors.NodeTranslator
- visit_Computation(node: gt4py.cartesian.gtc.numpy.npir.Computation) gt4py.cartesian.gtc.numpy.npir.Computation [source]
- visit_HorizontalBlock(node: gt4py.cartesian.gtc.numpy.npir.HorizontalBlock, *, temps_from_scalars: Dict[str, gt4py.cartesian.gtc.numpy.scalars_to_temps.Temporary]) gt4py.cartesian.gtc.numpy.npir.HorizontalBlock [source]
- visit_LocalScalarAccess(node: gt4py.cartesian.gtc.numpy.npir.LocalScalarAccess, *, temps_from_scalars: Dict[str, gt4py.cartesian.gtc.numpy.scalars_to_temps.Temporary]) gt4py.cartesian.gtc.numpy.npir.FieldSlice [source]
- class gt4py.cartesian.gtc.numpy.scalars_to_temps.Temporary(name: str, dtype: gt4py.cartesian.gtc.common.DataType, extent: gt4py.cartesian.gtc.definitions.Extent)[source]
Bases:
object