Reference Guide  2.5.0
psyclone.psyGen.PSy Class Reference
Inheritance diagram for psyclone.psyGen.PSy:

Public Member Functions

def __init__ (self, invoke_info)
 
def container (self)
 
def __str__ (self)
 
def invokes (self)
 
def name (self)
 
def gen (self)
 

Detailed Description

Base class to help manage and generate PSy code for a single
algorithm file. Takes the invocation information output from the
function :func:`parse.algorithm.parse` as its input and stores this in a
way suitable for optimisation and code generation.

:param FileInfo invoke_info: An object containing the required \
                             invocation information for code \
                             optimisation and generation. Produced \
                             by the function :func:`parse.algorithm.parse`.
:type invoke_info: :py:class:`psyclone.parse.algorithm.FileInfo`

For example:

>>> from psyclone.parse.algorithm import parse
>>> ast, info = parse("argspec.F90")
>>> from psyclone.psyGen import PSyFactory
>>> api = "..."
>>> psy = PSyFactory(api).create(info)
>>> print(psy.gen)

Definition at line 217 of file psyGen.py.

Member Function Documentation

◆ container()

def psyclone.psyGen.PSy.container (   self)
:returns: the container associated with this PSy object
:rtype: :py:class:`psyclone.psyir.nodes.Container`

Definition at line 248 of file psyGen.py.

248  def container(self):
249  '''
250  :returns: the container associated with this PSy object
251  :rtype: :py:class:`psyclone.psyir.nodes.Container`
252  '''
253  return self._container
254 

References psyclone.nemo.NemoPSy._container, and psyclone.psyGen.PSy._container.

Here is the caller graph for this function:

◆ gen()

def psyclone.psyGen.PSy.gen (   self)
Abstract base class for code generation function.

:returns: root node of generated Fortran AST.
:rtype: :py:class:`psyclone.psyir.nodes.Node`

Reimplemented in psyclone.nemo.NemoPSy, psyclone.gocean1p0.GOPSy, and psyclone.dynamo0p3.DynamoPSy.

Definition at line 274 of file psyGen.py.

274  def gen(self):
275  '''Abstract base class for code generation function.
276 
277  :returns: root node of generated Fortran AST.
278  :rtype: :py:class:`psyclone.psyir.nodes.Node`
279  '''
280 
281 

◆ invokes()

def psyclone.psyGen.PSy.invokes (   self)
:returns: the list of invokes.
:rtype: :py:class:`psyclone.psyGen.Invokes` or derived class

Definition at line 259 of file psyGen.py.

259  def invokes(self):
260  ''':returns: the list of invokes.
261  :rtype: :py:class:`psyclone.psyGen.Invokes` or derived class
262  '''
263  return self._invokes
264 

References psyclone.dynamo0p3.DynamoPSy._invokes, psyclone.gocean1p0.GOPSy._invokes, psyclone.nemo.NemoInvoke._invokes, psyclone.nemo.NemoPSy._invokes, psyclone.psyGen.PSy._invokes, and psyclone.psyGen.Invoke._invokes.

Here is the caller graph for this function:

◆ name()


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