psyclone.domain.lfric.kern_call_invoke_arg_list

This module implements a class that captures all the arguments of a Kernel as required by an invoke of that kernel.

Classes

class psyclone.domain.lfric.kern_call_invoke_arg_list.KernCallInvokeArgList(kern, symbol_table)

Determines the arguments that must be provided to an invoke of a kernel, according to that kernel’s metadata.

Parameters:
Raises:

TypeError – if supplied symbol table is of incorrect type.

Inheritance

Inheritance diagram of KernCallInvokeArgList
field(arg, var_accesses=None)

Add the field array associated with the argument ‘arg’ to the argument list and an appropriate Symbol to the SymbolTable.

Parameters:
field_vector(argvect, var_accesses=None)

Add the field vector associated with the argument ‘argvect’ to the argument list and an associated Symbol to the SymbolTable.

Parameters:
property fields
Returns:

the field (and field-vector) arguments plus their corresponding function spaces.

Return type:

List[Tuple(psyclone.psyir.symbols.DataSymbol, str)]

fs_common(function_space, var_accesses=None)

Does nothing as there are no arguments associated with function spaces at the algorithm level.

Parameters:
generate(var_accesses=None)

Ensures that our internal lists of arguments of various types are reset (as calling generate() populates them) before calling this method in the parent class.

Parameters:

var_accesses (psyclone.core.VariablesAccessInfo) – optional VariablesAccessInfo instance to store the information about variable accesses.

operator(arg, var_accesses=None)

Add the operator argument. If supplied it also stores this access in var_accesses.

Parameters:
property operators
Returns:

the symbols representing the operators required by the kernel along with the names of the from- and to- function spaces.

Return type:

List[Tuple[psyclone.psyir.symbols.DataSymbol, str, str]]

quad_rule(var_accesses=None)

Add quadrature-related information to the kernel argument list. Adds the necessary arguments to the argument list and suitable symbols to the SymbolTable. Optionally also adds variable access information to the var_accesses object.

Parameters:

var_accesses (psyclone.core.VariablesAccessInfo) – optional VariablesAccessInfo instance to store the information about variable accesses.

property quadrature_objects
Returns:

the symbols representing the quadrature objects required by the kernel along with the shape of each.

Return type:

List[Tuple[psyclone.psyir.symbols.DataSymbol, str]]

scalar(scalar_arg, var_accesses=None)

Add the necessary argument for a scalar quantity as well as an appropriate Symbol to the SymbolTable.

Parameters:
Raises:

NotImplementedError – if a scalar of type other than real or integer is found.

property scalars
Returns:

the scalar arguments to the kernel.

Return type:

List[psyclone.psyir.symbols.DataSymbol]

stencil(arg, var_accesses=None)

Add general stencil information associated with the argument ‘arg’ to the argument list.

Parameters:
Raises:

NotImplementedError – stencils are not yet supported.

stencil_2d(arg, var_accesses=None)

Add general 2D stencil information associated with the argument ‘arg’ to the argument list. This method passes through to the KernCallInvokeArgList.stencil() method.

Parameters:
stencil_2d_unknown_extent(arg, var_accesses=None)

Add 2D stencil information to the argument list associated with the argument ‘arg’ if the extent is unknown. If supplied it also stores this access in var_accesses.

Parameters:
Raises:

NotImplementedError – stencils are not yet supported.

stencil_unknown_extent(arg, var_accesses=None)

Add stencil information to the argument list associated with the argument ‘arg’ if the extent is unknown. If supplied it also stores this access in var_accesses.

Parameters:
Raises:

NotImplementedError – stencils are not yet supported.