Reference Guide  2.5.0
psyclone.psyGen.GlobalSum Class Reference
Inheritance diagram for psyclone.psyGen.GlobalSum:
Collaboration diagram for psyclone.psyGen.GlobalSum:

Public Member Functions

def __init__ (self, scalar, parent=None)
 
def scalar (self)
 
def dag_name (self)
 
def args (self)
 
def node_str (self, colour=True)
 

Detailed Description

Generic Global Sum class which can be added to and manipulated
in, a schedule.

:param scalar: the scalar that the global sum is stored into
:type scalar: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
:param parent: optional parent (default None) of this object
:type parent: :py:class:`psyclone.psyir.nodes.Node`

Definition at line 782 of file psyGen.py.

Member Function Documentation

◆ args()

def psyclone.psyGen.GlobalSum.args (   self)
 Return the list of arguments associated with this node. Override
the base method and simply return our argument.

Definition at line 823 of file psyGen.py.

823  def args(self):
824  ''' Return the list of arguments associated with this node. Override
825  the base method and simply return our argument.'''
826  return [self._scalar]
827 

References psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._scalar(), psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._scalar(), and psyclone.psyGen.GlobalSum._scalar.

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

◆ dag_name()

def psyclone.psyGen.GlobalSum.dag_name (   self)
:returns: the name to use in the DAG for this node.
:rtype: str

Definition at line 815 of file psyGen.py.

815  def dag_name(self):
816  '''
817  :returns: the name to use in the DAG for this node.
818  :rtype: str
819  '''
820  return f"globalsum({self._scalar.name})_{self.position}"
821 
Here is the caller graph for this function:

◆ node_str()

def psyclone.psyGen.GlobalSum.node_str (   self,
  colour = True 
)
Returns a text description of this node with (optional) control codes
to generate coloured output in a terminal that supports it.

:param bool colour: whether or not to include colour control codes.

:returns: description of this node, possibly coloured.
:rtype: str

Definition at line 828 of file psyGen.py.

828  def node_str(self, colour=True):
829  '''
830  Returns a text description of this node with (optional) control codes
831  to generate coloured output in a terminal that supports it.
832 
833  :param bool colour: whether or not to include colour control codes.
834 
835  :returns: description of this node, possibly coloured.
836  :rtype: str
837  '''
838  return f"{self.coloured_name(colour)}[scalar='{self._scalar.name}']"
839 
840 
Here is the caller graph for this function:

◆ scalar()

def psyclone.psyGen.GlobalSum.scalar (   self)
 Return the scalar field that this global sum acts on 

Definition at line 810 of file psyGen.py.

810  def scalar(self):
811  ''' Return the scalar field that this global sum acts on '''
812  return self._scalar
813 

References psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._scalar(), psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._scalar(), and psyclone.psyGen.GlobalSum._scalar.

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: