Reference Guide  2.5.0
psyclone.parse.kernel.Descriptor Class Reference
Inheritance diagram for psyclone.parse.kernel.Descriptor:

Public Member Functions

def __init__ (self, access, space, metadata_index, stencil=None, mesh=None, argument_type=None)
 
def access (self)
 
def function_space (self)
 
def metadata_index (self)
 
def stencil (self)
 
def mesh (self)
 
def argument_type (self)
 
def __repr__ (self)
 

Detailed Description

A description of how a kernel argument is accessed, constructed from
the kernel metadata.

:param str access: whether argument is read/write etc.
:param str space: which function space/grid-point type argument is on.
:param int metadata_index: position of this argument in the list of \
                           arguments specified in the metadata.
:param dict stencil: type of stencil access for this argument. \
                     Defaults to None if the argument is not supplied.
:param str mesh: which mesh this argument is on. Defaults to None \
                 if the argument is not supplied.
:param str argument_type: the type of this argument. Defaults to \
                          None if the argument is not supplied.

:raises InternalError: if the metadata_index argument is not an int or is \
                       less than zero.

Definition at line 413 of file kernel.py.

Member Function Documentation

◆ access()

def psyclone.parse.kernel.Descriptor.access (   self)
:returns: whether argument is read/write etc.
:rtype: str

Definition at line 448 of file kernel.py.

448  def access(self):
449  '''
450  :returns: whether argument is read/write etc.
451  :rtype: str
452 
453  '''
454  return self._access
455 

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.

Here is the caller graph for this function:

◆ argument_type()

def psyclone.parse.kernel.Descriptor.argument_type (   self)
:returns: the type of the argument depending on the specific \
          API (e.g. scalar, field, grid property, operator).
:rtype: str or NoneType

Definition at line 493 of file kernel.py.

493  def argument_type(self):
494  '''
495  :returns: the type of the argument depending on the specific \
496  API (e.g. scalar, field, grid property, operator).
497  :rtype: str or NoneType
498 
499  '''
500  return self._argument_type
501 

References psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._argument_type, psyclone.dynamo0p3.DynKernelArgument._argument_type, psyclone.gocean1p0.GOKernelGridArgument._argument_type, psyclone.gocean1p0.GO1p0Descriptor._argument_type, and psyclone.parse.kernel.Descriptor._argument_type.

Here is the caller graph for this function:

◆ function_space()

def psyclone.parse.kernel.Descriptor.function_space (   self)
:returns: which function space/grid-point type argument is on.
:rtype: str

Reimplemented in psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor.

Definition at line 457 of file kernel.py.

457  def function_space(self):
458  '''
459  :returns: which function space/grid-point type argument is on.
460  :rtype: str
461 
462  '''
463  return self._space
464 

References psyclone.parse.kernel.Descriptor._space.

Here is the caller graph for this function:

◆ mesh()

def psyclone.parse.kernel.Descriptor.mesh (   self)
:returns: the mesh the argument is on.
:rtype: str or NoneType

Definition at line 484 of file kernel.py.

484  def mesh(self):
485  '''
486  :returns: the mesh the argument is on.
487  :rtype: str or NoneType
488 
489  '''
490  return self._mesh
491 

References psyclone.domain.lfric.kernel.meta_mesh_arg_metadata.MetaMeshArgMetadata._mesh, psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._mesh, psyclone.dynamo0p3.DynKernelArgument._mesh, and psyclone.parse.kernel.Descriptor._mesh.

◆ metadata_index()

def psyclone.parse.kernel.Descriptor.metadata_index (   self)
:returns: the position of the corresponding argument descriptor in \
          the kernel metadata.
:rtype: int

Definition at line 466 of file kernel.py.

466  def metadata_index(self):
467  '''
468  :returns: the position of the corresponding argument descriptor in \
469  the kernel metadata.
470  :rtype: int
471  '''
472  return self._metadata_index
473 

References psyclone.parse.kernel.Descriptor._metadata_index.

◆ stencil()

def psyclone.parse.kernel.Descriptor.stencil (   self)
:returns: type of stencil access for this argument.
:rtype: dict or NoneType

Definition at line 475 of file kernel.py.

475  def stencil(self):
476  '''
477  :returns: type of stencil access for this argument.
478  :rtype: dict or NoneType
479 
480  '''
481  return self._stencil
482 

References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._stencil, psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._stencil(), psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata._stencil, psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._stencil, psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._stencil(), psyclone.dynamo0p3.DynKernelArgument._stencil, psyclone.gocean1p0.GOStencil._stencil, and psyclone.parse.kernel.Descriptor._stencil.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: