Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, parent, root) |
def | parent (self) |
def | children (self) |
def | root (self) |
def | add (self, new_object, position=None) |
def | previous_loop (self) |
def | last_declaration (self) |
def | start_parent_loop (self, debug=False) |
The base class for all classes that are responsible for generating distinct code elements (modules, subroutines, do loops etc.)
Definition at line 173 of file f2pygen.py.
def psyclone.f2pygen.BaseGen.add | ( | self, | |
new_object, | |||
position = None |
|||
) |
Adds a new object to the tree. The actual position is determined by the position argument. Note, there are two trees, the first is the f2pygen object tree, the other is the f2py generated code tree. These are similar but different. At the moment we specify where to add things in terms of the f2pygen tree (which is a higher level api) but we also insert into the f2py tree at exactly the same location which needs to be sorted out at some point.
Reimplemented in psyclone.f2pygen.IfThenGen.
Definition at line 196 of file f2pygen.py.
References psyclone.f2pygen.BaseGen.children(), psyclone.psyGen.InlinedKern.children, psyclone.psyir.nodes.node.Node.children(), psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().
def psyclone.f2pygen.BaseGen.children | ( | self | ) |
Returns the list of children of this object
Definition at line 187 of file f2pygen.py.
References psyclone.f2pygen.BaseGen._children, psyclone.psyir.nodes.node.Node._children, and psyclone.psyir.nodes.omp_directives.OMPParallelDirective._children.
def psyclone.f2pygen.BaseGen.last_declaration | ( | self | ) |
Returns the *last* occurrence of a Declaration in the list of siblings of this node
Definition at line 261 of file f2pygen.py.
References psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().
def psyclone.f2pygen.BaseGen.parent | ( | self | ) |
Returns the parent of this object
Definition at line 182 of file f2pygen.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.GridArg._parent, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._parent, psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.ScalarArg._parent, psyclone.domain.lfric.lfric_kern.LFRicKern._parent, psyclone.f2pygen.BaseGen._parent, and psyclone.psyir.nodes.node.Node._parent.
def psyclone.f2pygen.BaseGen.previous_loop | ( | self | ) |
Returns the *last* occurrence of a loop in the list of siblings of this node
Definition at line 252 of file f2pygen.py.
References psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().
def psyclone.f2pygen.BaseGen.root | ( | self | ) |
Returns the root of the tree containing this object
Reimplemented in psyclone.f2pygen.BaseDeclGen.
Definition at line 192 of file f2pygen.py.
References psyclone.f2pygen.BaseGen._root.
def psyclone.f2pygen.BaseGen.start_parent_loop | ( | self, | |
debug = False |
|||
) |
Searches for the outer-most loop containing this object. Returns the index of that line in the content of the parent.
Definition at line 273 of file f2pygen.py.
References psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().