Holds all information on the Column-Matrix-Assembly operators
required by an Invoke or Kernel stub.
:param node: either an Invoke schedule or a single Kernel object.
:type node: :py:class:`psyclone.dynamo0p3.DynSchedule` or \
:py:class:`psyclone.domain.lfric.LFRicKern`
Definition at line 1777 of file dynamo0p3.py.
def psyclone.dynamo0p3.DynCMAOperators.initialise |
( |
|
self, |
|
|
|
parent |
|
) |
| |
Generates the calls to the LFRic infrastructure that look-up
the various components of each CMA operator. Adds these as
children of the supplied parent node.
:param parent: f2pygen node representing the PSy-layer routine.
:type parent: :py:class:`psyclone.f2pygen.SubroutineGen`
Reimplemented from psyclone.domain.lfric.lfric_collection.LFRicCollection.
Definition at line 1867 of file dynamo0p3.py.
1867 def initialise(self, parent):
1869 Generates the calls to the LFRic infrastructure that look-up
1870 the various components of each CMA operator. Adds these as
1871 children of the supplied parent node.
1873 :param parent: f2pygen node representing the PSy-layer routine.
1874 :type parent: :py:class:`psyclone.f2pygen.SubroutineGen`
1878 if not self._cma_ops:
1881 parent.add(CommentGen(parent,
""))
1882 parent.add(CommentGen(parent,
1883 " Look-up information for each CMA operator"))
1884 parent.add(CommentGen(parent,
""))
1886 const = LFRicConstants()
1887 suffix = const.ARG_TYPE_SUFFIX_MAPPING[
"gh_columnwise_operator"]
1889 for op_name
in self._cma_ops:
1892 cma_name = self._symbol_table.lookup_with_tag(
1893 f
"{op_name}:{suffix}").name
1894 parent.add(AssignGen(parent, lhs=cma_name, pointer=
True,
1895 rhs=self._cma_ops[op_name][
"arg"].
1896 proxy_name_indexed+
"%columnwise_matrix"))
1898 for param
in self._cma_ops[op_name][
"params"]:
1899 param_name = self._symbol_table.find_or_create_tag(
1900 f
"{op_name}:{param}:{suffix}").name
1901 parent.add(AssignGen(parent, lhs=param_name,
1902 rhs=self._cma_ops[op_name][
"arg"].
1903 proxy_name_indexed+
"%"+param))
References psyclone.dynamo0p3.DynCMAOperators._cma_ops, psyclone.domain.lfric.lfric_collection.LFRicCollection._invoke, psyclone.nemo.NemoInvokeSchedule._invoke, psyclone.psyGen.InvokeSchedule._invoke, psyclone.domain.lfric.lfric_collection.LFRicCollection._symbol_table, psyclone.dynamo0p3.DynMeshes._symbol_table, psyclone.dynamo0p3.HaloDepth._symbol_table, psyclone.psyGen.HaloExchange._symbol_table, psyclone.psyir.backend.sympy_writer.SymPyWriter._symbol_table, and psyclone.psyir.nodes.scoping_node.ScopingNode._symbol_table.