Reference Guide  2.5.0
psyclone.gocean1p0.GOHaloExchange Class Reference
Inheritance diagram for psyclone.gocean1p0.GOHaloExchange:
Collaboration diagram for psyclone.gocean1p0.GOHaloExchange:

Public Member Functions

def __init__ (self, field, check_dirty=False, parent=None)
 
def lower_to_language_level (self)
 
- Public Member Functions inherited from psyclone.psyGen.HaloExchange
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)
 

Additional Inherited Members

- Public Attributes inherited from psyclone.psyGen.HaloExchange
 vector_index
 

Detailed Description

GOcean specific 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.gocean1p0.GOKernelArgument`
:param bool check_dirty: optional argument default False (contrary to \
    its generic class - revisit in #856) indicating whether this halo \
    exchange should be subject to a run-time check for clean/dirty halos.
:param parent: optional PSyIR parent node (default None) of this object.
:type parent: :py:class:`psyclone.psyir.nodes.Node`

Definition at line 2241 of file gocean1p0.py.

Member Function Documentation

◆ lower_to_language_level()

def psyclone.gocean1p0.GOHaloExchange.lower_to_language_level (   self)
In-place replacement of DSL or high-level concepts into generic
PSyIR constructs. A GOHaloExchange is replaced by a call to the
appropriate library method.

:returns: the lowered version of this node.
:rtype: :py:class:`psyclone.psyir.node.Node`

Definition at line 2259 of file gocean1p0.py.

2259  def lower_to_language_level(self):
2260  '''
2261  In-place replacement of DSL or high-level concepts into generic
2262  PSyIR constructs. A GOHaloExchange is replaced by a call to the
2263  appropriate library method.
2264 
2265  :returns: the lowered version of this node.
2266  :rtype: :py:class:`psyclone.psyir.node.Node`
2267 
2268  '''
2269  # TODO 856: Wrap Halo call with an is_dirty flag when necessary.
2270 
2271  # TODO 886: Currently only stencils of depth 1 are accepted by this
2272  # API, so the HaloExchange is hardcoded to depth 1.
2273 
2274  # Call the halo_exchange routine with depth argument to 1
2275  # Currently we create an symbol name with % as a workaround of not
2276  # having type bound routines.
2277  rsymbol = RoutineSymbol(self.field.name + "%" +
2278  self._halo_exchange_name)
2279  call_node = Call.create(rsymbol, [Literal("1", INTEGER_TYPE)])
2280  self.replace_with(call_node)
2281  return call_node
2282 
2283 
2284 # For Sphinx AutoAPI documentation generation

References psyclone.dynamo0p3.LFRicHaloExchange._halo_exchange_name, psyclone.dynamo0p3.LFRicHaloExchangeStart._halo_exchange_name, psyclone.dynamo0p3.LFRicHaloExchangeEnd._halo_exchange_name, psyclone.gocean1p0.GOHaloExchange._halo_exchange_name, 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.psyir.nodes.node.Node.replace_with().

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: