Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, call, parent_call, check=True) |
def | get_arg_on_space_name (self, func_space_name) |
def | get_arg_on_space (self, func_space) |
def | has_operator (self, op_type=None) |
def | unique_fss (self) |
def | unique_fs_names (self) |
def | iteration_space_arg (self) |
def | dofs (self) |
def | psyir_expressions (self) |
def | acc_args (self) |
def | scalars (self) |
Public Member Functions inherited from psyclone.psyGen.Arguments | |
def | __init__ (self, parent_call) |
def | names (self) |
def | args (self) |
def | append (self, name, argument_type) |
Provides information about Dynamo kernel call arguments collectively, as specified by the kernel argument metadata. :param call: the kernel metadata for which to extract argument info. :type call: :py:class:`psyclone.parse.KernelCall` :param parent_call: the kernel-call object. :type parent_call: :py:class:`psyclone.domain.lfric.LFRicKern` :param bool check: whether to check for consistency between the \ kernel metadata and the algorithm layer. Defaults to True. :raises GenerationError: if the kernel metadata specifies stencil extent.
Definition at line 5035 of file dynamo0p3.py.
def psyclone.dynamo0p3.DynKernelArguments.acc_args | ( | self | ) |
:returns: the list of quantities that must be available on an \ OpenACC device before the associated kernel can be launched. :rtype: list of str
Reimplemented from psyclone.psyGen.Arguments.
Definition at line 5324 of file dynamo0p3.py.
References psyclone.psyGen.Arguments._parent_call.
def psyclone.dynamo0p3.DynKernelArguments.dofs | ( | self | ) |
Currently required for Invoke base class although this makes no sense for Dynamo. Need to refactor the Invoke base class and remove the need for this property (#279).
Definition at line 5307 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._dofs, psyclone.gocean1p0.GOKernelArguments._dofs, and psyclone.psyGen.Invoke._dofs.
def psyclone.dynamo0p3.DynKernelArguments.get_arg_on_space | ( | self, | |
func_space | |||
) |
Returns the first argument (field or operator) found that is on the specified function space. The mangled name of the supplied function space is used for comparison. :param func_space: The function space for which to find an argument. :type func_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :return: the first kernel argument that is on the supplied function space :rtype: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :raises: FieldNotFoundError if no field or operator argument is found for the specified function space.
Definition at line 5178 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._args, psyclone.gocean1p0.GOKernelArguments._args, psyclone.parse.algorithm.ParsedCall._args, and psyclone.psyGen.Arguments._args.
def psyclone.dynamo0p3.DynKernelArguments.get_arg_on_space_name | ( | self, | |
func_space_name | |||
) |
Returns the first argument (field or operator) found that is on the named function space, as specified in the kernel metadata. Also returns the associated FunctionSpace object. :param str func_space_name: Name of the function space (as specified \ in kernel metadata) for which to \ find an argument. :return: the first kernel argument that is on the named function \ space and the associated FunctionSpace object. :rtype: (:py:class:`psyclone.dynamo0p3.DynKernelArgument`, :py:class:`psyclone.domain.lfric.FunctionSpace`) :raises: FieldNotFoundError if no field or operator argument is found \ for the named function space.
Definition at line 5153 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._args, psyclone.gocean1p0.GOKernelArguments._args, psyclone.parse.algorithm.ParsedCall._args, and psyclone.psyGen.Arguments._args.
def psyclone.dynamo0p3.DynKernelArguments.has_operator | ( | self, | |
op_type = None |
|||
) |
Returns true if at least one of the arguments is an operator of type op_type (either gh_operator [LMA] or gh_columnwise_operator [CMA]). If op_type is None then searches for *any* valid operator type.
Definition at line 5203 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._args, psyclone.gocean1p0.GOKernelArguments._args, psyclone.parse.algorithm.ParsedCall._args, and psyclone.psyGen.Arguments._args.
def psyclone.dynamo0p3.DynKernelArguments.iteration_space_arg | ( | self | ) |
Returns an argument we can use to dereference the iteration space. This can be a field or operator that is modified or alternatively a field that is read if one or more scalars are modified. If a kernel writes to more than one argument then that requiring the largest iteration space is selected. :return: Kernel argument from which to obtain iteration space :rtype: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
Reimplemented from psyclone.psyGen.Arguments.
Definition at line 5236 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._args, psyclone.gocean1p0.GOKernelArguments._args, psyclone.parse.algorithm.ParsedCall._args, psyclone.psyGen.Arguments._args, and psyclone.psyGen.Arguments._parent_call.
def psyclone.dynamo0p3.DynKernelArguments.psyir_expressions | ( | self | ) |
:returns: the PSyIR expressions representing this Argument list. :rtype: list of :py:class:`psyclone.psyir.nodes.Node`
Reimplemented from psyclone.psyGen.Arguments.
Definition at line 5313 of file dynamo0p3.py.
References psyclone.psyGen.Arguments._parent_call.
def psyclone.dynamo0p3.DynKernelArguments.scalars | ( | self | ) |
Provides the list of names of scalar arguments required by the kernel associated with this Arguments object. If there are none then the returned list is empty. :returns: A list of the names of scalar arguments in this object. :rtype: list of str
Reimplemented from psyclone.psyGen.Arguments.
Definition at line 5336 of file dynamo0p3.py.
def psyclone.dynamo0p3.DynKernelArguments.unique_fs_names | ( | self | ) |
Return the list of unique function space names used by the arguments of this kernel. The names are unmangled (i.e. as specified in the kernel metadata)
Definition at line 5230 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._unique_fs_names.
def psyclone.dynamo0p3.DynKernelArguments.unique_fss | ( | self | ) |
Returns a unique list of function space objects used by the arguments of this kernel
Definition at line 5224 of file dynamo0p3.py.
References psyclone.dynamo0p3.DynKernelArguments._unique_fss.