psyclone.domain.lfric.algorithm.psyir

Module to capture LFRic-specific PSyIR for the Algorithm layer.

Submodules

Classes

class psyclone.domain.lfric.algorithm.psyir.LFRicAlgorithmInvokeCall(invoke_routine_symbol, index, parent=None, name=None)

An invoke call from the LFRic Algorithm layer.

Inheritance

Inheritance diagram of LFRicAlgorithmInvokeCall
class psyclone.domain.lfric.algorithm.psyir.LFRicKernelFunctor(symbol, parent=None)

Object containing a call to a user-provided LFRic kernel, a description of its required interface and the arguments to be passed to it.

Inheritance

Inheritance diagram of LFRicKernelFunctor
class psyclone.domain.lfric.algorithm.psyir.LFRicBuiltinFunctor(symbol, parent=None)

Base class which all LFRic builtins subclass. Contains a builtin call, a description of its required interface and the arguments to be passed to it.

Inheritance

Inheritance diagram of LFRicBuiltinFunctor
classmethod create(table, arguments)

An appropriate DataTypeSymbol is created and added to the supplied symbol table (if it does not already contain one). This is then passed to the create() method in the base class to create an instance of an LFRic builtin call with the supplied list of arguments.

Parameters:
Returns:

a functor object describing an LFRic builtin.

Return type:

psyclone.domain.lfric.algorithm.LFRicBuiltinFunctor

Raises:

InternalError – if a symbol is found that has the same name as a built-in but does not have the correct properties.

lower_to_language_level()

Removes the symbol representing this BuiltIn as it only exists in the DSL.

Returns:

the lowered version of this node.

Return type:

psyclone.psyir.node.Node

class psyclone.domain.lfric.algorithm.psyir.LFRicBuiltinFunctorFactory

This class is a singleton which generates and stores a Functor class for each built-in supported by LFRic. An instance of one of these classes may be obtained by using the create() method.

Raises:

ValueError – if an attempt is made to construct a second instance of this class.

Inheritance

Inheritance diagram of LFRicBuiltinFunctorFactory
create(name, table, arguments)

Create a BuiltinFunctor for the named LFRic builtin.

Parameters:
static get()
Returns:

the singleton instance of this class.

Return type:

py:class:

psyclone.domain.lfric.algorithm.psyir.LFRicBuiltinFunctorFactory