psyclone.domain.lfric.lfric_builtins
This module implements the support for ‘built-in’ operations in the PSyclone LFRic (Dynamo 0.3) 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
LFRicBuiltInCallFactory
: Creates the necessary framework for a call to an LFRic built-in,LFRicBuiltIn
: Abstract base class for a node representing a call to an LFRicLFRicXPlusYKern
: Add one, real-valued, field to another and return the result asLFRicIncXPlusYKern
: Add the second, real-valued, field to the first field and return it.LFRicAPlusXKern
: Y = a + X where a is a real scalar and X and Y areLFRicIncAPlusXKern
: X = a + X where a is a real scalar and X is a real-valuedLFRicAXPlusYKern
: Z = a*X + Y where a is a real scalar and Z, X andLFRicIncAXPlusYKern
: X = a*X + Y where a is a real scalar and X and Y areLFRicIncXPlusBYKern
: X = X + b*Y where b is a real scalar and X and Y areLFRicAXPlusBYKern
: Z = a*X + b*Y where a and b are real scalars and Z, X andLFRicIncAXPlusBYKern
: X = a*X + b*Y where a and b are real scalars and X and YLFRicAXPlusAYKern
: Z = a*X + a*Y = a*(X + Y) where a is a real scalar and Z,LFRicXMinusYKern
: Subtract one, real-valued, field from another and return theLFRicIncXMinusYKern
: Subtract the second, real-valued, field from the first fieldLFRicAMinusXKern
: Y = a - X where a is a real scalar and X and Y are real-valuedLFRicIncAMinusXKern
: X = a - X where a is a real scalar and X is a real-valuedLFRicXMinusAKern
: Y = X - a where a is a real scalar and X and Y are real-valuedLFRicIncXMinusAKern
: X = X - a where a is a real scalar and X is a real-valuedLFRicAXMinusYKern
: Z = a*X - Y where a is a real scalar and Z, X andLFRicXMinusBYKern
: Z = X - b*Y where b is a real scalar and Z, X andLFRicIncXMinusBYKern
: X = X - b*Y where b is a real scalar and X and Y areLFRicAXMinusBYKern
: Z = a*X - b*Y where a and b are real scalars and Z, X andLFRicXTimesYKern
: DoF-wise product of one, real-valued, field with another withLFRicIncXTimesYKern
: Multiply the first, real-valued, field by the second and return it.LFRicIncAXTimesYKern
: X = a*X*Y where a is a real scalar and X and Y areLFRicATimesXKern
: Multiply the first, real-valued, field by a real scalar andLFRicIncATimesXKern
: Multiply a real-valued field by a real scalar and return it.LFRicXDividebyYKern
: Divide the first, real-valued, field by the second and returnLFRicIncXDividebyYKern
: Divide the first, real-valued, field by the second and return it.LFRicXDividebyAKern
: Divide a real-valued field by a real scalar and return theLFRicIncXDividebyAKern
: Divide a real-valued field by a real scalar and return it.LFRicADividebyXKern
: DoF-wise division of a scalar value a by the elementsLFRicIncADividebyXKern
: DoF-wise division of a scalar value a by the elementsLFRicIncXPowrealAKern
: Raise a real-valued field to a real power and return it.LFRicIncXPowintNKern
: Raise a real-valued field to an integer power and return it.LFRicSetvalCKern
: Set a real-valued field equal to a real scalar value.LFRicSetvalXKern
: Set a real-valued field equal to another, real-valued, field.LFRicSetvalRandomKern
: Fill a real-valued field with pseudo-random numbers.LFRicXInnerproductYKern
: Calculates the inner product of two real-valued fields,LFRicXInnerproductXKern
: Calculates the inner product of one real-valued field by itself,LFRicSumXKern
: Computes the sum of the elements of a real-valued field.LFRicSignXKern
: Returns the sign of a real-valued field elements using theLFRicMaxAXKern
: Returns the maximum of a real scalar and real-valued fieldLFRicIncMaxAXKern
: Returns the maximum of a real scalar and real-valued fieldLFRicMinAXKern
: Returns the minimum of a real scalar and real-valued fieldLFRicIncMinAXKern
: Returns the minimum of a real scalar and real-valued fieldLFRicRealToIntXKern
: Converts real-valued field elements to integer-valuedLFRicRealToRealXKern
: Converts real-valued field elements to real-valued field elementsLFRicIntXPlusYKern
: Add corresponding elements of two, integer-valued, fields, XLFRicIntIncXPlusYKern
: Add each element of an integer-valued field, X, to theLFRicIntAPlusXKern
: Add an integer scalar value, a, to each element of anLFRicIntIncAPlusXKern
: Add an integer scalar value, a, to each element of anLFRicIntXMinusYKern
: Subtract each element of an integer-valued field, Y, fromLFRicIntIncXMinusYKern
: Subtract each element of an integer-valued field, Y, fromLFRicIntAMinusXKern
: Subtract each element of an integer-valued field, X, fromLFRicIntIncAMinusXKern
: Subtract each element of an integer-valued field, X, fromLFRicIntXMinusAKern
: Subtract an integer scalar value, a, from each element of anLFRicIntIncXMinusAKern
: Subtract an integer scalar value, a, from each element of anLFRicIntXTimesYKern
: Multiply each element of one, integer-valued, field, X, byLFRicIntIncXTimesYKern
: Multiply each element of one, integer-valued, field, X, byLFRicIntATimesXKern
: Multiply each element of the first, integer-valued, field, X,LFRicIntIncATimesXKern
: Multiply each element of an integer-valued field, X byLFRicIntSetvalCKern
: Assign a single constant integer scalar value, c, to allLFRicIntSetvalXKern
: Copy one element of an integer-valued field (second argument),LFRicIntSignXKern
: Returns the sign of an integer-valued field elements using theLFRicIntMaxAXKern
: Returns the maximum of an integer scalar and integer-valuedLFRicIntIncMaxAXKern
: Returns the maximum of an integer scalar and integer-valuedLFRicIntMinAXKern
: Returns the minimum of an integer scalar and integer-valuedLFRicIntIncMinAXKern
: Returns the minimum of an integer scalar and integer-valuedLFRicIntToRealXKern
: Converts integer-valued field elements to real-valued
- class psyclone.domain.lfric.lfric_builtins.LFRicBuiltInCallFactory
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
- static create(call, parent=None)
Create the objects needed for a call to the built-in described in the call (BuiltInCall) object.
- Parameters:
call (
psyclone.parse.algorithm.BuiltInCall
) – details of the call to this built-in in the Algorithm layer.parent (
psyclone.dynamo0p3.DynInvokeSchedule
) – the schedule instance to which the built-in call belongs.
- 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
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
- 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.dynamo0p3.FSDescriptor
- get_dof_loop_index_symbol()
Finds or creates the symbol representing the index in any loops over DoFs.
- Returns:
symbol representing the DoF loop index.
- Return type:
- get_indexed_field_argument_references()
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:
- get_scalar_argument_references()
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 is_intergrid
We don’t have any inter-grid built-ins.
- Returns:
False
- Return type:
bool
- load(call, parent=None)
Populate the state of this object using the supplied call object.
- Parameters:
call (
psyclone.parse.algorithm.BuiltInCall
) – The BuiltIn object from which to extract information about this built-in call.parent (
psyclone.domain.lfric.LFRicLoop
) – The parent node of the kernel call in the PSyIR we are constructing. This will be a loop.
- abstract static metadata()
Must be overridden by subclass.
- property qr_required
Built-ins do not currently require quadrature.
- Returns:
False
- Return type:
bool
- reference_accesses(var_accesses)
Get all variable access information from this node. The assigned-to variable will be set to ‘WRITE’.
- Parameters:
var_accesses (
psyclone.core.VariablesAccessInfo
) – VariablesAccessInfo instance that stores the information about variable accesses.- 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
Add one, real-valued, field to another and return the result as a third, real-valued, field.
Inheritance
- lower_to_language_level()
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()
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
Add the second, real-valued, field to the first field and return it.
Inheritance
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
X = a + X where a is a real scalar and X is a real-valued field (DoF-wise addition of a scalar value).
Inheritance
- lower_to_language_level()
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()
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
Z = a*X + Y where a is a real scalar and Z, X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
X = a*X + Y where a is a real scalar and X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
X = X + b*Y where b is a real scalar and X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
Z = a*X + b*Y where a and b are real scalars and Z, X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
X = a*X + b*Y where a and b are real scalars and X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
Z = a*X + a*Y = a*(X + Y) where a is a real scalar and Z, X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
Subtract one, real-valued, field from another and return the result as a third, real-valued, field.
Inheritance
- lower_to_language_level()
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()
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
Subtract the second, real-valued, field from the first field and return it.
Inheritance
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
Z = a*X - Y where a is a real scalar and Z, X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
Z = X - b*Y where b is a real scalar and Z, X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
X = X - b*Y where b is a real scalar and X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
Z = a*X - b*Y where a and b are real scalars and Z, X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
DoF-wise product of one, real-valued, field with another with the result returned as a third, real-valued, field.
Inheritance
- lower_to_language_level()
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()
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
Multiply the first, real-valued, field by the second and return it.
Inheritance
- lower_to_language_level()
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()
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
X = a*X*Y where a is a real scalar and X and Y are real-valued fields.
Inheritance
- lower_to_language_level()
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()
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
Multiply the first, real-valued, field by a real scalar and return the result as a second, real-valued, field (Y = a*X).
Inheritance
- lower_to_language_level()
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()
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
Multiply a real-valued field by a real scalar and return it.
Inheritance
- lower_to_language_level()
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()
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
Divide the first, real-valued, field by the second and return the result as a third, real-valued, field.
Inheritance
- lower_to_language_level()
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()
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
Divide the first, real-valued, field by the second and return it.
Inheritance
- lower_to_language_level()
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()
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
Divide a real-valued field by a real scalar and return the result in another, real-valued, field.
Inheritance
- lower_to_language_level()
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()
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
Divide a real-valued field by a real scalar and return it.
Inheritance
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
Raise a real-valued field to a real power and return it.
Inheritance
- lower_to_language_level()
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()
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
Raise a real-valued field to an integer power and return it.
Inheritance
- lower_to_language_level()
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()
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
Set a real-valued field equal to a real scalar value.
Inheritance
- lower_to_language_level()
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()
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
Set a real-valued field equal to another, real-valued, field.
Inheritance
- lower_to_language_level()
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()
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
Fill a real-valued field with pseudo-random numbers.
Inheritance
- lower_to_language_level()
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()
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
Calculates the inner product of two real-valued fields, innprod = SUM( X(:)*Y(:) ).
Inheritance
- lower_to_language_level()
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()
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
Calculates the inner product of one real-valued field by itself, innprod = SUM( X(:)*X(:) ).
Inheritance
- lower_to_language_level()
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()
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
Computes the sum of the elements of a real-valued field.
Inheritance
- lower_to_language_level()
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()
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
Returns the sign of a real-valued field elements using the Fortran intrinsic sign function, Y = sign(a, X).
Inheritance
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- lower_to_language_level()
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()
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
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXPlusYKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntAPlusXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncAPlusXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntXMinusYKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXMinusYKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntAMinusXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncAMinusXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntXMinusAKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXMinusAKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntXTimesYKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncXTimesYKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntATimesXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncATimesXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntSetvalCKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntSetvalXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntSignXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntMaxAXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncMaxAXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntMinAXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntIncMinAXKern
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
- class psyclone.domain.lfric.lfric_builtins.LFRicIntToRealXKern
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
- lower_to_language_level()
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()
Returns the kernel metadata describing this built-in.
- Returns:
kernel metadata describing this built-in.
- Return type:
psyclone.domain.lfric.kernel.LFRicKernelMetadata