Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, ast, name=None) |
def | name (self) |
def | iterates_over (self) |
def | procedure (self) |
def | nargs (self) |
def | arg_descriptors (self) |
def | __repr__ (self) |
def | get_integer_variable (self, name) |
def | get_integer_array (self, name) |
Base class for describing Kernel Metadata. This contains the name of the elemental procedure and metadata associated with how that procedure is mapped over mesh entities. :param ast: fparser1 AST for the parsed kernel meta-data. :type ast: :py:class:`fparser.one.block_statements.BeginSource` :param str name: name of the Fortran derived type describing the kernel. :raises ParseError: if the supplied AST does not contain a Fortran \ module. :raises ParseError: if the module name is too short to contain \ '_mod' at the end. :raises ParseError: if the module name does not end in '_mod'.
def psyclone.parse.kernel.KernelType.arg_descriptors | ( | self | ) |
:returns: a list of API-specific argument descriptors. :rtype: list of API-specific specialisation of \ :py:class:`psyclone.kernel.Descriptor`
Definition at line 894 of file kernel.py.
References psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._arg_descriptors, psyclone.gocean1p0.GOKernelType1p0._arg_descriptors, psyclone.parse.kernel.KernelType._arg_descriptors, psyclone.psyGen.Kern._arg_descriptors, and psyclone.psyGen.BuiltIn._arg_descriptors.
def psyclone.parse.kernel.KernelType.get_integer_array | ( | self, | |
name | |||
) |
Parse the kernel meta-data and find the values of the integer array variable with the supplied name. Returns an empty list if no matching variable is found. The search is not case sensitive. :param str name: the name of the integer array to find. :return: list of values (lower-case). :rtype: list of str. :raises InternalError: if we fail to parse the LHS of the array \ declaration or the array constructor. :raises ParseError: if the array is not of rank 1. :raises ParseError: if the array extent is not specified using an \ integer literal. :raises ParseError: if the RHS of the declaration is not an array \ constructor. :raises InternalError: if the parse tree for the array constructor \ does not have the expected structure. :raises ParseError: if the number of items in the array constructor \ does not match the extent of the array.
Definition at line 939 of file kernel.py.
References psyclone.parse.algorithm.ParsedCall._ktype, and psyclone.parse.kernel.KernelType._ktype.
def psyclone.parse.kernel.KernelType.get_integer_variable | ( | self, | |
name | |||
) |
Parse the kernel meta-data and find the value of the integer variable with the supplied name. Return None if no matching variable is found. The search is not case sensitive. :param str name: the name of the integer variable to find. :return: value of the specified integer variable (lower case) or None. :rtype: str :raises ParseError: if the RHS of the assignment is not a Name.
Definition at line 906 of file kernel.py.
References psyclone.parse.algorithm.ParsedCall._ktype, and psyclone.parse.kernel.KernelType._ktype.
def psyclone.parse.kernel.KernelType.iterates_over | ( | self | ) |
:returns: the name of the iteration space supported by this kernel :rtype: str
Definition at line 866 of file kernel.py.
References psyclone.domain.common.psylayer.psyloop.PSyLoop._iterates_over, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata._iterates_over, psyclone.parse.kernel.KernelType._iterates_over, and psyclone.psyGen.Kern._iterates_over.
def psyclone.parse.kernel.KernelType.name | ( | self | ) |
:returns: the name of the kernel subroutine. :rtype: str
Definition at line 857 of file kernel.py.
References 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, and psyclone.psyir.symbols.symbol.Symbol._name.
def psyclone.parse.kernel.KernelType.nargs | ( | self | ) |
:returns: the number of arguments specified in the metadata. :rtype: int
Reimplemented in psyclone.gocean1p0.GOKernelType1p0.
Definition at line 885 of file kernel.py.
References psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._arg_descriptors, psyclone.gocean1p0.GOKernelType1p0._arg_descriptors, psyclone.parse.kernel.KernelType._arg_descriptors, psyclone.psyGen.Kern._arg_descriptors, and psyclone.psyGen.BuiltIn._arg_descriptors.
def psyclone.parse.kernel.KernelType.procedure | ( | self | ) |
:returns: a kernelprocedure instance which contains a parse tree \ of the kernel subroutine and its name. :rtype: :py:class:`psyclone.parse.kernel.KernelProcedure`
Definition at line 875 of file kernel.py.
References psyclone.parse.kernel.KernelType._procedure.