Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, form, text, varname=None, datatype=None) |
def | __str__ (self) |
def | form (self) |
def | text (self) |
def | varname (self) |
def | varname (self, value) |
def | is_literal (self) |
Static Public Attributes | |
list | form_options = ["literal", "variable", "indexed_variable", "collection"] |
Description of an argument as obtained from parsing kernel or builtin arguments within invokes in a PSyclone algorithm code. :param str form: describes whether the argument is a literal \ value, standard variable or indexed variable. Supported options \ are specified in the local form_options list. :param str text: the original Fortran text of the argument. :param varname: the extracted variable name from the text if the \ form is not literal otherwise it is set to None. This is optional \ and defaults to None. :value varname: str or NoneType :param datatype: a tuple containing information about the datatype \ and precision of the argument, or None if no information is \ available. Defaults to None. :type datatype: (str, str or NoneType) or NoneType :raises InternalError: if the form argument is not one one of the \ supported types as specified in the local form_options list.
Definition at line 1084 of file algorithm.py.
def psyclone.parse.algorithm.Arg.form | ( | self | ) |
:returns: a string indicating what type of variable this \ is. Supported options are specified in the local form_options \ list. :rtype: str
Definition at line 1125 of file algorithm.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._form, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.ScalarArg._form, psyclone.parse.algorithm.Arg._form, and psyclone.psyGen.Argument._form.
def psyclone.parse.algorithm.Arg.is_literal | ( | self | ) |
Indicates whether this argument is a literal or not. :returns: True if this argument is a literal and False otherwise. :rtype: bool
Definition at line 1163 of file algorithm.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._form, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.ScalarArg._form, psyclone.parse.algorithm.Arg._form, and psyclone.psyGen.Argument._form.
def psyclone.parse.algorithm.Arg.text | ( | self | ) |
:returns: the original Fortran text of the argument. :rtype: str
Definition at line 1136 of file algorithm.py.
References psyclone.parse.algorithm.Arg._text, and psyclone.psyGen.Argument._text.
def psyclone.parse.algorithm.Arg.varname | ( | self | ) |
:returns: the extracted variable name from the text if the \ form is not literal and None otherwise :rtype: str or NoneType
Definition at line 1145 of file algorithm.py.
References psyclone.parse.algorithm.Arg._varname.
def psyclone.parse.algorithm.Arg.varname | ( | self, | |
value | |||
) |
Allows the setting or re-setting of the variable name value. :param str value: the new variable name
Definition at line 1155 of file algorithm.py.
References psyclone.parse.algorithm.Arg._varname, and psyclone.parse.algorithm.Arg.varname().