psyclone.domain.lfric.lfric_builtins#

This module implements the support for ‘built-in’ operations in the PSyclone LFRic API. Each supported built-in is implemented as a different Python class, all inheriting from the LFRicBuiltIn class. The LFRicBuiltInCallFactory creates the Python object required for a given built-in call.

Classes#

class psyclone.domain.lfric.lfric_builtins.LFRicBuiltInCallFactory[source]#

Creates the necessary framework for a call to an LFRic built-in, This consists of the operation itself and the loop over unique DoFs.

Inheritance

Inheritance diagram of LFRicBuiltInCallFactory
static create(call, parent=None)[source]#

Create the objects needed for a call to the built-in described in the call (BuiltInCall) object.

Parameters:
Raises:
  • ParseError – if the name of the function being called is not a recognised built-in.

  • InternalError – if the built-in does not iterate over DoFs.

class psyclone.domain.lfric.lfric_builtins.LFRicBuiltIn[source]#

Abstract base class for a node representing a call to an LFRic built-in.

Raises:

NotImplementedError – if a subclass of this abstract class does not set the value of ‘_datatype’.

Inheritance

Inheritance diagram of LFRicBuiltIn
property cma_operation#

Built-ins do not perform operations with Column-Matrix-Assembly operators.

Returns:

None

Return type:

NoneType

property fs_descriptors#
Returns:

a list of function space descriptor objects which contain information about the function spaces.

Return type:

list of psyclone.lfric.FSDescriptor

get_dof_loop_index_symbol()[source]#

Finds or creates the symbol representing the index in any loops over DoFs.

Returns:

symbol representing the DoF loop index.

Return type:

psyclone.psyir.symbols.DataSymbol

get_indexed_field_argument_references()[source]#

Creates a DoF-indexed StructureReference for each of the field arguments to this Built-In kernel. e.g. if the kernel has a field argument named ‘fld1’ then this routine will create an ArrayReference for ‘fld1_data(df)’ where ‘df’ is the DoF-loop variable and ‘fld1_data’ is the pointer to the data array within the fld1 object.

Returns:

a reference to the ‘df’th element of each kernel argument that is a field.

Return type:

List[psyclone.psyir.nodes.ArrayReference]

get_scalar_argument_references()[source]#

Finds or creates either a Reference (for a symbol) or PSyIR (for a literal expression) for any scalar arguments to this Built-In kernel.

Returns:

a Reference or PSyIR expression for each scalar kernel argument.

Return type:

list of subclasses of :py:class:`psyclone.psyir.nodes.Node

property halo_depth#
Returns:

None as BuiltIns do not (by default) iterate into halo cells.

Return type:

NoneType

property is_intergrid#

We don’t have any inter-grid built-ins.

Returns:

False

Return type:

bool

load(call, parent=None)[source]#

Populate the state of this object using the supplied call object.

Parameters:
abstractmethod static metadata()[source]#

Must be overridden by subclass.

property qr_required#

Built-ins do not currently require quadrature.

Returns:

False

Return type:

bool

reference_accesses()[source]#
Return type:

VariablesAccessMap

Returns:

a map of all the symbol accessed inside this node, the keys are Signatures (unique identifiers to a symbol and its structure acccessors) and the values are AccessSequence (a sequence of AccessTypes).

Raises:

InternalError – if an unsupported argument type is encountered.

property reference_element#

Built-ins do not require reference-element properties.

Returns:

None

Return type:

NoneType

property undf_name#

Dynamically looks up the name of the ‘undf’ variable for the space that this kernel updates.

Returns:

the name of the undf variable.

Return type:

str

class psyclone.domain.lfric.lfric_builtins.LFRicXPlusYKern[source]#

Add one, real-valued, field to another and return the result as a third, real-valued, field.

Inheritance

Inheritance diagram of LFRicXPlusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This Built-In node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in. Implemented in a datatype-independent way to allow for re-use.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXPlusYKern[source]#

Add the second, real-valued, field to the first field and return it.

Inheritance

Inheritance diagram of LFRicIncXPlusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAPlusXKern[source]#

Y = a + X where a is a real scalar and X and Y are real-valued fields (DoF-wise addition of a scalar value).

Inheritance

Inheritance diagram of LFRicAPlusXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncAPlusXKern[source]#

X = a + X where a is a real scalar and X is a real-valued field (DoF-wise addition of a scalar value).

Inheritance

Inheritance diagram of LFRicIncAPlusXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAXPlusYKern[source]#

Z = a*X + Y where a is a real scalar and Z, X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicAXPlusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncAXPlusYKern[source]#

X = a*X + Y where a is a real scalar and X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicIncAXPlusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXPlusBYKern[source]#

X = X + b*Y where b is a real scalar and X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicIncXPlusBYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAXPlusBYKern[source]#

Z = a*X + b*Y where a and b are real scalars and Z, X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicAXPlusBYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncAXPlusBYKern[source]#

X = a*X + b*Y where a and b are real scalars and X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicIncAXPlusBYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAXPlusAYKern[source]#

Z = a*X + a*Y = a*(X + Y) where a is a real scalar and Z, X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicAXPlusAYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXMinusYKern[source]#

Subtract one, real-valued, field from another and return the result as a third, real-valued, field.

Inheritance

Inheritance diagram of LFRicXMinusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXMinusYKern[source]#

Subtract the second, real-valued, field from the first field and return it.

Inheritance

Inheritance diagram of LFRicIncXMinusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAMinusXKern[source]#

Y = a - X where a is a real scalar and X and Y are real-valued fields (DoF-wise subtraction of field elements from a scalar value).

Inheritance

Inheritance diagram of LFRicAMinusXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncAMinusXKern[source]#

X = a - X where a is a real scalar and X is a real-valued field (DoF-wise subtraction of field elements from a scalar value).

Inheritance

Inheritance diagram of LFRicIncAMinusXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXMinusAKern[source]#

Y = X - a where a is a real scalar and X and Y are real-valued fields (DoF-wise subtraction of a scalar value from field elements).

Inheritance

Inheritance diagram of LFRicXMinusAKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXMinusAKern[source]#

X = X - a where a is a real scalar and X is a real-valued field (DoF-wise subtraction of a scalar value from field elements).

Inheritance

Inheritance diagram of LFRicIncXMinusAKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAXMinusYKern[source]#

Z = a*X - Y where a is a real scalar and Z, X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicAXMinusYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXMinusBYKern[source]#

Z = X - b*Y where b is a real scalar and Z, X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicXMinusBYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXMinusBYKern[source]#

X = X - b*Y where b is a real scalar and X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicIncXMinusBYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicAXMinusBYKern[source]#

Z = a*X - b*Y where a and b are real scalars and Z, X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicAXMinusBYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXTimesYKern[source]#

DoF-wise product of one, real-valued, field with another with the result returned as a third, real-valued, field.

Inheritance

Inheritance diagram of LFRicXTimesYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXTimesYKern[source]#

Multiply the first, real-valued, field by the second and return it.

Inheritance

Inheritance diagram of LFRicIncXTimesYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncAXTimesYKern[source]#

X = a*X*Y where a is a real scalar and X and Y are real-valued fields.

Inheritance

Inheritance diagram of LFRicIncAXTimesYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicATimesXKern[source]#

Multiply the first, real-valued, field by a real scalar and return the result as a second, real-valued, field (Y = a*X).

Inheritance

Inheritance diagram of LFRicATimesXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncATimesXKern[source]#

Multiply a real-valued field by a real scalar and return it.

Inheritance

Inheritance diagram of LFRicIncATimesXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXDividebyYKern[source]#

Divide the first, real-valued, field by the second and return the result as a third, real-valued, field.

Inheritance

Inheritance diagram of LFRicXDividebyYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXDividebyYKern[source]#

Divide the first, real-valued, field by the second and return it.

Inheritance

Inheritance diagram of LFRicIncXDividebyYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXDividebyAKern[source]#

Divide a real-valued field by a real scalar and return the result in another, real-valued, field.

Inheritance

Inheritance diagram of LFRicXDividebyAKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXDividebyAKern[source]#

Divide a real-valued field by a real scalar and return it.

Inheritance

Inheritance diagram of LFRicIncXDividebyAKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicADividebyXKern[source]#

DoF-wise division of a scalar value a by the elements of a real-valued field, X, storing the result in another, real-valued, field, Y (Y = a/X).

Inheritance

Inheritance diagram of LFRicADividebyXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncADividebyXKern[source]#

DoF-wise division of a scalar value a by the elements of a real-valued field, X, storing the result in the same field (X = a/X).

Inheritance

Inheritance diagram of LFRicIncADividebyXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXPowrealAKern[source]#

Raise a real-valued field to a real power and return it.

Inheritance

Inheritance diagram of LFRicIncXPowrealAKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncXPowintNKern[source]#

Raise a real-valued field to an integer power and return it.

Inheritance

Inheritance diagram of LFRicIncXPowintNKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicSetvalCKern[source]#

Set a real-valued field equal to a real scalar value.

Inheritance

Inheritance diagram of LFRicSetvalCKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicSetvalXKern[source]#

Set a real-valued field equal to another, real-valued, field.

Inheritance

Inheritance diagram of LFRicSetvalXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicSetvalRandomKern[source]#

Fill a real-valued field with pseudo-random numbers.

Inheritance

Inheritance diagram of LFRicSetvalRandomKern
lower_to_language_level()[source]#

Lowers this LFRic built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an IntrinsicCall node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.IntrinsicCall

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXInnerproductYKern[source]#

Calculates the inner product of two real-valued fields, innprod = SUM( X(:)*Y(:) ).

Inheritance

Inheritance diagram of LFRicXInnerproductYKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicXInnerproductXKern[source]#

Calculates the inner product of one real-valued field by itself, innprod = SUM( X(:)*X(:) ).

Inheritance

Inheritance diagram of LFRicXInnerproductXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicSumXKern[source]#

Computes the sum of the elements of a real-valued field.

Inheritance

Inheritance diagram of LFRicSumXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicSignXKern[source]#

Returns the sign of a real-valued field elements using the Fortran intrinsic sign function, Y = sign(a, X).

Inheritance

Inheritance diagram of LFRicSignXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicMaxAXKern[source]#

Returns the maximum of a real scalar and real-valued field elements. The result is stored as another, real-valued, field: Y = max(a, X).

Inheritance

Inheritance diagram of LFRicMaxAXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncMaxAXKern[source]#

Returns the maximum of a real scalar and real-valued field elements. The result is stored in the same, real-valued, field: X = max(a, X).

Inheritance

Inheritance diagram of LFRicIncMaxAXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicMinAXKern[source]#

Returns the minimum of a real scalar and real-valued field elements. The result is stored as another, real-valued, field: Y = min(a, X).

Inheritance

Inheritance diagram of LFRicMinAXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIncMinAXKern[source]#

Returns the minimum of a real scalar and real-valued field elements. The result is stored in the same, real-valued, field: X = min(a, X).

Inheritance

Inheritance diagram of LFRicIncMinAXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicRealToIntXKern[source]#

Converts real-valued field elements to integer-valued field elements using the Fortran intrinsic INT function, Y = INT(X, kind=i_<prec>). Here Y is an integer-valued field of precision i_<prec> and X is the real-valued field being converted.

Inheritance

Inheritance diagram of LFRicRealToIntXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicRealToRealXKern[source]#

Converts real-valued field elements to real-valued field elements of a different precision using the Fortran intrinsic REAL function, Y = REAL(X, kind=r_<prec>). Here Y is a real-valued field of precision kind=r_<prec> and X is the real-valued field whose values are to be converted from their defined precision.

Inheritance

Inheritance diagram of LFRicRealToRealXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata

class psyclone.domain.lfric.lfric_builtins.LFRicIntXPlusYKern[source]#

Add corresponding elements of two, integer-valued, fields, X and Y, and return the result as a third, integer-valued, field, Z. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicXPlusYKern.

Inheritance

Inheritance diagram of LFRicIntXPlusYKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXPlusYKern[source]#

Add each element of an integer-valued field, X, to the corresponding element of another integer-valued field, Y, and store the result back in X. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncXPlusYKern.

Inheritance

Inheritance diagram of LFRicIntIncXPlusYKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntAPlusXKern[source]#

Add an integer scalar value, a, to each element of an integer-valued field, X, and return the result as a second, integer-valued, field, Y. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicAPlusXKern.

Inheritance

Inheritance diagram of LFRicIntAPlusXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncAPlusXKern[source]#

Add an integer scalar value, a, to each element of an integer-valued field, X, and return the result in the same field. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncAPlusXKern.

Inheritance

Inheritance diagram of LFRicIntIncAPlusXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntXMinusYKern[source]#

Subtract each element of an integer-valued field, Y, from the corresponding element of another, integer-valued, field, X, and return the result as a third, integer-valued, field, Z. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicXMinusYKern.

Inheritance

Inheritance diagram of LFRicIntXMinusYKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXMinusYKern[source]#

Subtract each element of an integer-valued field, Y, from the corresponding element of another, integer-valued, field, X, and store the result back in X. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncXMinusYKern.

Inheritance

Inheritance diagram of LFRicIntIncXMinusYKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntAMinusXKern[source]#

Subtract each element of an integer-valued field, X, from an integer scalar value, a, and return the result as a second, integer-valued, field, Y. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicAMinusXKern.

Inheritance

Inheritance diagram of LFRicIntAMinusXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncAMinusXKern[source]#

Subtract each element of an integer-valued field, X, from an integer scalar value, a, and return the result in the same field. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncAMinusXKern.

Inheritance

Inheritance diagram of LFRicIntIncAMinusXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntXMinusAKern[source]#

Subtract an integer scalar value, a, from each element of an integer-valued field, X, and return the result as a second, integer-valued, field, Y. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicXMinusAKern.

Inheritance

Inheritance diagram of LFRicIntXMinusAKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXMinusAKern[source]#

Subtract an integer scalar value, a, from each element of an integer-valued field, X, and return the result in the same field. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncXMinusAKern.

Inheritance

Inheritance diagram of LFRicIntIncXMinusAKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntXTimesYKern[source]#

Multiply each element of one, integer-valued, field, X, by the corresponding element of another, integer-valued, field, Y, and return the result as a third, integer-valued, field, Z. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicXTimesYKern.

Inheritance

Inheritance diagram of LFRicIntXTimesYKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXTimesYKern[source]#

Multiply each element of one, integer-valued, field, X, by the corresponding element of another, integer-valued, field, Y, and store the result back in X. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncXTimesYKern.

Inheritance

Inheritance diagram of LFRicIntIncXTimesYKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntATimesXKern[source]#

Multiply each element of the first, integer-valued, field, X, by an integer scalar, a, and return the result as a second, integer-valued, field Y (Y = a*X). Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicATimesXKern.

Inheritance

Inheritance diagram of LFRicIntATimesXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncATimesXKern[source]#

Multiply each element of an integer-valued field, X by an integer scalar, a, and store the result back in X. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncATimesXKern.

Inheritance

Inheritance diagram of LFRicIntIncATimesXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntSetvalCKern[source]#

Assign a single constant integer scalar value, c, to all elements of an integer-valued field, X. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicSetvalCKern.

Inheritance

Inheritance diagram of LFRicIntSetvalCKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntSetvalXKern[source]#

Copy one element of an integer-valued field (second argument), X, to the corresponding element of another, integer-valued, field (first argument), Y. Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicSetvalXKern.

Inheritance

Inheritance diagram of LFRicIntSetvalXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntSignXKern[source]#

Returns the sign of an integer-valued field elements using the Fortran intrinsic sign function, Y = sign(a, X). Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicSignXKern.

Inheritance

Inheritance diagram of LFRicIntSignXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntMaxAXKern[source]#

Returns the maximum of an integer scalar and integer-valued field elements. The result is stored as another, integer-valued, field: Y = max(a, X). Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicMaxAXKern.

Inheritance

Inheritance diagram of LFRicIntMaxAXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncMaxAXKern[source]#

Returns the maximum of an integer scalar and integer-valued field elements. The result is stored in the same, integer-valued, field: X = max(a, X). Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncMaxAXKern.

Inheritance

Inheritance diagram of LFRicIntIncMaxAXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntMinAXKern[source]#

Returns the minimum of an integer scalar and integer-valued field elements. The result is stored as another, integer-valued, field: Y = min(a, X). Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicMinAXKern.

Inheritance

Inheritance diagram of LFRicIntMinAXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntIncMinAXKern[source]#

Returns the minimum of an integer scalar and integer-valued field elements. The result is stored in the same, integer-valued, field: X = min(a, X). Inherits the lower_to_language_level method from the real-valued built-in equivalent LFRicIncMinAXKern.

Inheritance

Inheritance diagram of LFRicIntIncMinAXKern
class psyclone.domain.lfric.lfric_builtins.LFRicIntToRealXKern[source]#

Converts integer-valued field elements to real-valued field elements using the Fortran intrinsic REAL function, Y = REAL(X, kind=r_<prec>). Here Y is a real-valued field of precision r_<prec> and X is the integer-valued field being converted.

Inheritance

Inheritance diagram of LFRicIntToRealXKern
lower_to_language_level()[source]#

Lowers this LFRic-specific built-in kernel to language-level PSyIR. This BuiltIn node is replaced by an Assignment node.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

classmethod metadata()[source]#

Returns the kernel metadata describing this built-in.

Returns:

kernel metadata describing this built-in.

Return type:

psyclone.domain.lfric.kernel.LFRicKernelMetadata