Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, call, arg_info, access) |
def | psyir_expression (self) |
def | infer_datatype (self) |
def | __str__ (self) |
def | name (self) |
def | text (self) |
def | form (self) |
def | is_literal (self) |
def | access (self) |
def | access (self, value) |
def | argument_type (self) |
def | intrinsic_type (self) |
def | precision (self) |
def | data_type (self) |
def | module_name (self) |
def | call (self) |
def | call (self, value) |
def | backward_dependence (self) |
def | forward_write_dependencies (self, ignore_halos=False) |
def | backward_write_dependencies (self, ignore_halos=False) |
def | forward_dependence (self) |
def | forward_read_dependencies (self) |
Argument base class. Captures information on an argument that is passed to a Kernel from an Invoke. :param call: the kernel call that this argument is associated with. :type call: :py:class:`psyclone.psyGen.Kern` :param arg_info: Information about this argument collected by \ the parser. :type arg_info: :py:class:`psyclone.parse.algorithm.Arg` :param access: the way in which this argument is accessed in \ the 'Kern'. Valid values are specified in the config \ object of the current API. :type access: str
def psyclone.psyGen.Argument.access | ( | self, | |
value | |||
) |
Set the access type for this argument. :param value: new access type. :type value: :py:class:`psyclone.core.access_type.AccessType`. :raises InternalError: if value is not an AccessType.
Definition at line 2266 of file psyGen.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.GridArg._access, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._access, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.ScalarArg._access, psyclone.domain.lfric.kernel.common_meta_arg_metadata.CommonMetaArgMetadata._access, psyclone.parse.kernel.Descriptor._access, psyclone.psyGen.Argument._access, and psyclone.psyir.symbols.interfaces.ArgumentInterface._access.
def psyclone.psyGen.Argument.argument_type | ( | self | ) |
Returns the type of the argument. APIs that do not have this concept can use this base class version which just returns "field" in all cases. APIs with this concept can override this method. :returns: the API type of the kernel argument. :rtype: str
Reimplemented in psyclone.gocean1p0.GOKernelGridArgument, psyclone.gocean1p0.GOKernelArgument, and psyclone.dynamo0p3.DynKernelArgument.
Definition at line 2282 of file psyGen.py.
def psyclone.psyGen.Argument.backward_dependence | ( | self | ) |
Returns the preceding argument that this argument has a direct dependence with, or None if there is not one. The argument may exist in a call, a haloexchange, or a globalsum. :returns: the first preceding argument that has a dependence \ on this argument. :rtype: :py:class:`psyclone.psyGen.Argument`
Reimplemented in psyclone.gocean1p0.GOKernelGridArgument.
Definition at line 2348 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, and psyclone.psyGen.Argument._find_argument().
def psyclone.psyGen.Argument.backward_write_dependencies | ( | self, | |
ignore_halos = False |
|||
) |
Returns a list of previous write arguments that this argument has dependencies with. The arguments may exist in a call, a haloexchange (unless `ignore_halos` is `True`), or a globalsum. If none are found then return an empty list. If self is not a reader then return an empty list. :param ignore_halos: if `True` then any write dependencies \ involving a halo exchange are ignored. Defaults to `False`. :type ignore_halos: bool :returns: a list of arguments that have a preceding write \ dependence on this argument. :rtype: list of :py:class:`psyclone.psyGen.Argument`
Definition at line 2380 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, and psyclone.psyGen.Argument._find_write_arguments().
def psyclone.psyGen.Argument.call | ( | self | ) |
Return the call that this argument is associated with
Definition at line 2339 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, and psyclone.psyGen.Argument._call.
def psyclone.psyGen.Argument.call | ( | self, | |
value | |||
) |
set the node that this argument is associated with
Definition at line 2344 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, and psyclone.psyGen.Argument.call().
def psyclone.psyGen.Argument.data_type | ( | self | ) |
:returns: the data type of this argument. Default value is None, \ explicit implementation is left to a specific API. :rtype: str or NoneType
Definition at line 2317 of file psyGen.py.
References psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._data_type, psyclone.dynamo0p3.DynKernelArgument._data_type, and psyclone.psyGen.Argument._data_type.
def psyclone.psyGen.Argument.forward_dependence | ( | self | ) |
Returns the following argument that this argument has a direct dependence on, or `None` if there is not one. The argument may exist in a call, a haloexchange, or a globalsum. :returns: the first following argument that has a dependence \ on this argument. :rtype: :py:class:`psyclone.psyGen.Argument`
Reimplemented in psyclone.gocean1p0.GOKernelGridArgument.
Definition at line 2400 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, and psyclone.psyGen.Argument._find_argument().
def psyclone.psyGen.Argument.forward_read_dependencies | ( | self | ) |
Returns a list of following read arguments that this argument has dependencies with. The arguments may exist in a call, a haloexchange, or a globalsum. If none are found then return an empty list. If self is not a writer then return an empty list. :returns: a list of following arguments that have a read \ dependence on this argument. :rtype: list of :py:class:`psyclone.psyGen.Argument`
Definition at line 2413 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, psyclone.psyGen.Argument._depends_on(), psyclone.psyGen.Argument._find_read_arguments(), psyclone.domain.common.algorithm.psyir.AlgorithmInvokeCall._name, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata._name, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.GridArg._name, psyclone.domain.lfric.kernel.lfric_kernel_metadata.LFRicKernelMetadata._name, psyclone.dynamo0p3.DynFuncDescriptor03._name, psyclone.expression.NamedArg._name, psyclone.gocean1p0.GOKernelGridArgument._name, psyclone.gocean1p0.GOStencil._name, psyclone.nemo.NemoInvoke._name, psyclone.nemo.NemoPSy._name, psyclone.parse.algorithm.FileInfo._name, psyclone.parse.algorithm.InvokeCall._name, psyclone.parse.kernel.KernelProcedure._name, psyclone.parse.kernel.KernelType._name, psyclone.parse.module_info.ModuleInfo._name, psyclone.psyGen.PSy._name, psyclone.psyGen.Invoke._name, psyclone.psyGen.Kern._name, psyclone.psyGen.Argument._name, psyclone.psyir.nodes.container.Container._name, psyclone.psyir.nodes.routine.Routine._name, psyclone.psyir.symbols.symbol.Symbol._name, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.GridArg.access, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg.access, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.ScalarArg.access(), psyclone.domain.lfric.kernel.common_meta_arg_metadata.CommonMetaArgMetadata.access, psyclone.dynamo0p3.DynKernelArgument.access, psyclone.parse.kernel.Descriptor.access(), psyclone.psyGen.Argument.access(), and psyclone.psyir.symbols.interfaces.ArgumentInterface.access.
def psyclone.psyGen.Argument.forward_write_dependencies | ( | self, | |
ignore_halos = False |
|||
) |
Returns a list of following write arguments that this argument has dependencies with. The arguments may exist in a call, a haloexchange (unless `ignore_halos` is `True`), or a globalsum. If none are found then return an empty list. If self is not a reader then return an empty list. :param bool ignore_halos: if `True` then any write dependencies \ involving a halo exchange are ignored. Defaults to `False`. :returns: a list of arguments that have a following write \ dependence on this argument. :rtype: list of :py:class:`psyclone.psyGen.Argument`
Definition at line 2361 of file psyGen.py.
References psyclone.f2pygen.CallGen._call, psyclone.gocean1p0.GOKernelGridArgument._call, psyclone.psyGen.DataAccess._call, psyclone.psyGen.Argument._call, and psyclone.psyGen.Argument._find_write_arguments().
def psyclone.psyGen.Argument.infer_datatype | ( | self | ) |
Infer the datatype of this argument using the API rules. If no specialisation of this method has been provided make the type UnresolvedType for now (it may be provided later in the execution). :returns: the datatype of this argument. :rtype: :py:class::`psyclone.psyir.symbols.DataType`
Reimplemented in psyclone.gocean1p0.GOKernelArgument.
Definition at line 2231 of file psyGen.py.
def psyclone.psyGen.Argument.intrinsic_type | ( | self | ) |
Abstract property for the intrinsic type of the argument with specific implementations in different APIs. :returns: the intrinsic type of this argument. :rtype: str
Reimplemented in psyclone.gocean1p0.GOKernelGridArgument, psyclone.gocean1p0.GOKernelArgument, and psyclone.dynamo0p3.DynKernelArgument.
Definition at line 2296 of file psyGen.py.
def psyclone.psyGen.Argument.module_name | ( | self | ) |
:returns: the name of the Fortran module that contains definitions \ for the argument data type. Default value is None, \ explicit implementation is left to a specific API. :rtype: str or NoneType
Definition at line 2327 of file psyGen.py.
References psyclone.dynamo0p3.DynKernelArgument._module_name, psyclone.parse.algorithm.ParsedCall._module_name, psyclone.parse.algorithm.KernelCall._module_name, psyclone.psyGen.CodedKern._module_name, psyclone.psyGen.Argument._module_name, and psyclone.psyir.nodes.psy_data_node.PSyDataNode._module_name.
def psyclone.psyGen.Argument.precision | ( | self | ) |
:returns: the precision of this argument. Default value is None, \ explicit implementation is left to a specific API. :rtype: str or NoneType
Definition at line 2307 of file psyGen.py.
References psyclone.dynamo0p3.DynKernelArgument._precision, psyclone.psyGen.Argument._precision, psyclone.psyir.symbols.datatypes.ScalarType._precision, and psyclone.psyir.symbols.datatypes.ArrayType._precision.
def psyclone.psyGen.Argument.psyir_expression | ( | self | ) |
:returns: the PSyIR expression represented by this Argument. :rtype: :py:class:`psyclone.psyir.nodes.Node`
Reimplemented in psyclone.gocean1p0.GOKernelGridArgument, psyclone.gocean1p0.GOKernelArgument, and psyclone.dynamo0p3.DynKernelArgument.