Reference Guide  2.5.0
psyclone.domain.gocean.kernel.psyir.GOceanContainer Class Reference
Inheritance diagram for psyclone.domain.gocean.kernel.psyir.GOceanContainer:
Collaboration diagram for psyclone.domain.gocean.kernel.psyir.GOceanContainer:

Public Member Functions

def __init__ (self, name, metadata, **kwargs)
 
def create (cls, name, metadata, symbol_table, children)
 
def metadata (self)
 
def lower_to_language_level (self)
 

Detailed Description

A GOcean-specific Container. This specialises the generic Container node
and adds in any domain-specific information.

:param str name: the name of the container.
:param metadata: the metadata object.
:type metadata: :py:class:`psyclone.domain.gocean.kernel.psyir.\
    GOceanKernelMetadata`
:param parent: optional parent node of this Container in the PSyIR.
:type parent: :py:class:`psyclone.psyir.nodes.Node`
:param symbol_table: initialise the node with a given symbol table.
:type symbol_table: \
    Optional[:py:class:`psyclone.psyir.symbols.SymbolTable`]

Definition at line 57 of file psyir.py.

Member Function Documentation

◆ create()

def psyclone.domain.gocean.kernel.psyir.GOceanContainer.create (   cls,
  name,
  metadata,
  symbol_table,
  children 
)
Create a GOceanContainer instance given a name, metadata, a symbol
table and a list of child nodes. A GOcean-specific kernel is
created with the metadata describing the kernel interface for
a single kernel routine within the container.

:param str name: the name of the Container.
:param symbol_table: the symbol table associated with this \
    Container.
:type symbol_table: :py:class:`psyclone.psyir.symbols.SymbolTable`
:param metadata: the metadata object.
:type metadata: :py:class:`psyclone.domain.gocean.kernel.psyir.\
    GOceanKernelMetadata`
:param children: a list of PSyIR nodes contained in the \
    Container. These must be Containers or Routines.
:type children: List[:py:class:`psyclone.psyir.nodes.Container` \
    | :py:class:`psyclone.psyir.nodes.Routine`]

:returns: an instance of `cls`.
:rtype: :py:class:`psyclone.psyir.nodes.Container` or subclass
    thereof

Definition at line 78 of file psyir.py.

78  def create(cls, name, metadata, symbol_table, children):
79  '''Create a GOceanContainer instance given a name, metadata, a symbol
80  table and a list of child nodes. A GOcean-specific kernel is
81  created with the metadata describing the kernel interface for
82  a single kernel routine within the container.
83 
84  :param str name: the name of the Container.
85  :param symbol_table: the symbol table associated with this \
86  Container.
87  :type symbol_table: :py:class:`psyclone.psyir.symbols.SymbolTable`
88  :param metadata: the metadata object.
89  :type metadata: :py:class:`psyclone.domain.gocean.kernel.psyir.\
90  GOceanKernelMetadata`
91  :param children: a list of PSyIR nodes contained in the \
92  Container. These must be Containers or Routines.
93  :type children: List[:py:class:`psyclone.psyir.nodes.Container` \
94  | :py:class:`psyclone.psyir.nodes.Routine`]
95 
96  :returns: an instance of `cls`.
97  :rtype: :py:class:`psyclone.psyir.nodes.Container` or subclass
98  thereof
99 
100  '''
101  return cls(name, metadata, children=children,
102  symbol_table=symbol_table.detach())
103 
Here is the caller graph for this function:

◆ lower_to_language_level()

def psyclone.domain.gocean.kernel.psyir.GOceanContainer.lower_to_language_level (   self)
Lower this GOcean-specific container to language level psyir.

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

Definition at line 113 of file psyir.py.

113  def lower_to_language_level(self):
114  '''Lower this GOcean-specific container to language level psyir.
115 
116  :returns: the lowered version of this node.
117  :rtype: :py:class:`psyclone.psyir.node.Node`
118 
119  '''
120  # Create metadata symbol and add it to the container symbol
121  # table.
122  data_symbol = self.metadata.lower_to_psyir()
123  self.symbol_table.add(data_symbol)
124 
125  # Replace this gocean container with a generic container
126  children = self.pop_all_children()
127  generic_container = Container.create(
128  self.name, self.symbol_table.detach(), children)
129  self.replace_with(generic_container)
130  return generic_container
131 
132 

References psyclone.domain.lfric.lfric_builtins.LFRicBuiltIn.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXPlusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXPlusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAPlusXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncAPlusXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAXPlusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncAXPlusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXPlusBYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAXPlusBYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncAXPlusBYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAXPlusAYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXMinusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXMinusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAMinusXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncAMinusXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXMinusAKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXMinusAKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAXMinusYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXMinusBYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXMinusBYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicAXMinusBYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXTimesYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXTimesYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncAXTimesYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicATimesXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncATimesXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXDividebyYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXDividebyYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXDividebyAKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXDividebyAKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicADividebyXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncADividebyXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXPowrealAKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncXPowintNKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicSetvalCKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicSetvalXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicSetvalRandomKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXInnerproductYKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicXInnerproductXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicSumXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicSignXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicMaxAXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncMaxAXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicMinAXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIncMinAXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicRealToIntXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicRealToRealXKern.metadata(), psyclone.domain.lfric.lfric_builtins.LFRicIntToRealXKern.metadata(), psyclone.domain.gocean.kernel.psyir.GOceanContainer.metadata(), psyclone.domain.lfric.kernel.psyir.LFRicKernelContainer.metadata(), psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.name, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.GridArg.name, psyclone.domain.gocean.transformations.gocean_const_loop_bounds_trans.GOConstLoopBoundsTrans.name(), psyclone.domain.gocean.transformations.gocean_move_iteration_boundaries_inside_kernel_trans.GOMoveIterationBoundariesInsideKernelTrans.name(), psyclone.domain.gocean.transformations.gocean_opencl_trans.GOOpenCLTrans.name(), psyclone.domain.lfric.kernel.lfric_kernel_metadata.LFRicKernelMetadata.name, psyclone.domain.nemo.transformations.create_nemo_invoke_schedule_trans.CreateNemoInvokeScheduleTrans.name(), psyclone.domain.nemo.transformations.create_nemo_psy_trans.CreateNemoPSyTrans.name(), psyclone.domain.nemo.transformations.nemo_allarrayrange2loop_trans.NemoAllArrayRange2LoopTrans.name(), psyclone.domain.nemo.transformations.nemo_arrayrange2loop_trans.NemoArrayRange2LoopTrans.name(), psyclone.domain.nemo.transformations.nemo_outerarrayrange2loop_trans.NemoOuterArrayRange2LoopTrans.name(), psyclone.dynamo0p3.DynamoPSy.name(), psyclone.expression.FunctionVar.name, psyclone.expression.NamedArg.name(), psyclone.gocean1p0.GOKernelGridArgument.name(), psyclone.gocean1p0.GOStencil.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.psyad.transformations.assignment_trans.AssignmentTrans.name(), psyclone.psyGen.PSy.name(), psyclone.psyGen.Invoke.name(), psyclone.psyGen.Kern.name(), psyclone.psyGen.CodedKern.name, psyclone.psyGen.Argument.name(), psyclone.psyGen.Transformation.name(), psyclone.psyGen.DummyTransformation.name(), psyclone.psyir.nodes.container.Container.name, psyclone.psyir.nodes.member.Member.name, psyclone.psyir.nodes.reference.Reference.name(), psyclone.psyir.nodes.routine.Routine.name, psyclone.psyir.symbols.symbol.Symbol.name(), psyclone.psyir.transformations.allarrayaccess2loop_trans.AllArrayAccess2LoopTrans.name(), psyclone.psyir.transformations.arrayrange2loop_trans.ArrayRange2LoopTrans.name(), psyclone.psyir.transformations.fold_conditional_return_expressions_trans.FoldConditionalReturnExpressionsTrans.name(), psyclone.psyir.transformations.loop_trans.LoopTrans.name(), psyclone.psyir.transformations.omp_task_trans.OMPTaskTrans.name(), psyclone.psyir.transformations.psy_data_trans.PSyDataTrans.name(), psyclone.transformations.OMPSingleTrans.name(), psyclone.transformations.OMPMasterTrans.name(), psyclone.transformations.OMPParallelTrans.name(), psyclone.transformations.MoveTrans.name(), psyclone.transformations.Dynamo0p3AsyncHaloExchangeTrans.name(), psyclone.transformations.Dynamo0p3KernelConstTrans.name(), psyclone.transformations.ACCEnterDataTrans.name(), psyclone.transformations.ACCRoutineTrans.name(), psyclone.transformations.ACCKernelsTrans.name(), psyclone.transformations.ACCDataTrans.name(), psyclone.transformations.KernelImportsToArguments.name(), psyclone.psyir.nodes.node.Node.pop_all_children(), psyclone.psyir.nodes.node.Node.replace_with(), psyclone.psyGen.InvokeSchedule.symbol_table(), and psyclone.psyir.nodes.scoping_node.ScopingNode.symbol_table.

Here is the caller graph for this function:

◆ metadata()

def psyclone.domain.gocean.kernel.psyir.GOceanContainer.metadata (   self)
:returns the GOcean metadata object.
:rtype: :py:class:`psyclone.domain.gocean.kernel.psyir.\
    GOceanKernelMetadata`

Definition at line 105 of file psyir.py.

105  def metadata(self):
106  '''
107  :returns the GOcean metadata object.
108  :rtype: :py:class:`psyclone.domain.gocean.kernel.psyir.\
109  GOceanKernelMetadata`
110  '''
111  return self._metadata
112 

References psyclone.domain.gocean.kernel.psyir.GOceanContainer._metadata, psyclone.domain.lfric.kernel.psyir.LFRicKernelContainer._metadata, and psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._metadata.

Here is the caller graph for this function:

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