Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, field, check_dirty=True, vector_index=None, parent=None) |
def | vector_index (self) |
def | halo_depth (self) |
def | halo_depth (self, value) |
def | field (self) |
def | dag_name (self) |
def | args (self) |
def | check_vector_halos_differ (self, node) |
def | node_str (self, colour=True) |
Public Attributes | |
vector_index | |
Generic Halo Exchange class which can be added to and manipulated in, a schedule. :param field: the field that this halo exchange will act on :type field: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param check_dirty: optional argument default True indicating whether \ this halo exchange should be subject to a run-time \ check for clean/dirty halos. :type check_dirty: bool :param vector_index: optional vector index (default None) to identify \ which index of a vector field this halo exchange is \ responsible for. :type vector_index: int :param parent: optional parent (default None) of this object :type parent: :py:class:`psyclone.psyir.nodes.Node`
def psyclone.psyGen.HaloExchange.args | ( | self | ) |
Return the list of arguments associated with this node. Overide the base method and simply return our argument.
Definition at line 920 of file psyGen.py.
References psyclone.domain.common.psylayer.psyloop.PSyLoop._field, psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._field(), psyclone.domain.lfric.lfric_loop.LFRicLoop._field, psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._field(), and psyclone.psyGen.HaloExchange._field.
def psyclone.psyGen.HaloExchange.check_vector_halos_differ | ( | self, | |
node | |||
) |
Helper method which checks that two halo exchange nodes (one being self and the other being passed by argument) operating on the same field, both have vector fields of the same size and use different vector indices. If this is the case then the halo exchange nodes do not depend on each other. If this is not the case then an internal error will have occured and we raise an appropriate exception. :param node: a halo exchange which should exchange the same field as \ self. :type node: :py:class:`psyclone.psyGen.HaloExchange` :raises GenerationError: if the argument passed is not a halo exchange. :raises GenerationError: if the field name in the halo exchange \ passed in has a different name to the field \ in this halo exchange. :raises GenerationError: if the field in this halo exchange is not a \ vector field :raises GenerationError: if the vector size of the field in this halo \ exchange is different to vector size of the \ field in the halo exchange passed by argument. :raises GenerationError: if the vector index of the field in this \ halo exchange is the same as the vector \ index of the field in the halo exchange \ passed by argument.
Definition at line 925 of file psyGen.py.
References psyclone.domain.common.psylayer.psyloop.PSyLoop.field, psyclone.psyGen.HaloExchange.field(), psyclone.domain.lfric.arg_ordering.ArgOrdering.field(), psyclone.domain.lfric.kern_call_arg_list.KernCallArgList.field(), psyclone.domain.lfric.kern_call_invoke_arg_list.KernCallInvokeArgList.field(), psyclone.domain.lfric.kern_stub_arg_list.KernStubArgList.field(), psyclone.domain.lfric.kernel_interface.KernelInterface.field(), and psyclone.psyGen.HaloExchange.vector_index.
def psyclone.psyGen.HaloExchange.dag_name | ( | self | ) |
:returns: the name to use in a dag for this node. :rtype: str
Definition at line 909 of file psyGen.py.
References psyclone.psyGen.HaloExchange._check_dirty.
def psyclone.psyGen.HaloExchange.field | ( | self | ) |
Return the field that the halo exchange acts on
Definition at line 904 of file psyGen.py.
References psyclone.domain.common.psylayer.psyloop.PSyLoop._field, psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._field(), psyclone.domain.lfric.lfric_loop.LFRicLoop._field, psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._field(), and psyclone.psyGen.HaloExchange._field.
def psyclone.psyGen.HaloExchange.halo_depth | ( | self | ) |
Return the depth of the halo exchange
Definition at line 894 of file psyGen.py.
References psyclone.psyGen.HaloExchange._halo_depth.
def psyclone.psyGen.HaloExchange.halo_depth | ( | self, | |
value | |||
) |
Set the depth of the halo exchange
Definition at line 899 of file psyGen.py.
References psyclone.psyGen.HaloExchange._halo_depth, and psyclone.psyGen.HaloExchange.halo_depth().
def psyclone.psyGen.HaloExchange.node_str | ( | self, | |
colour = True |
|||
) |
Returns the name 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
Reimplemented in psyclone.dynamo0p3.LFRicHaloExchange.
Definition at line 984 of file psyGen.py.
def psyclone.psyGen.HaloExchange.vector_index | ( | self | ) |
If the field is a vector then return the vector index associated with this halo exchange. Otherwise return None
Definition at line 888 of file psyGen.py.
References psyclone.psyGen.HaloExchange._vector_index.