Reference Guide  2.5.0
psyclone.f2pygen.ModuleGen Class Reference
Inheritance diagram for psyclone.f2pygen.ModuleGen:
Collaboration diagram for psyclone.f2pygen.ModuleGen:

Public Member Functions

def __init__ (self, name="", contains=True, implicitnone=True)
 
def add_raw_subroutine (self, content)
 
- Public Member Functions inherited from psyclone.f2pygen.ProgUnitGen
def __init__ (self, parent, sub)
 
def add (self, content, position=None, bubble_up=False)
 
- Public Member Functions inherited from psyclone.f2pygen.BaseGen
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)
 

Detailed Description

 create a fortran module 

Definition at line 580 of file f2pygen.py.

Member Function Documentation

◆ add_raw_subroutine()

def psyclone.f2pygen.ModuleGen.add_raw_subroutine (   self,
  content 
)
 adds a subroutine to the module that is a raw f2py parse object.
    This is used for inlining kernel subroutines into a module.

Definition at line 604 of file f2pygen.py.

604  def add_raw_subroutine(self, content):
605  ''' adds a subroutine to the module that is a raw f2py parse object.
606  This is used for inlining kernel subroutines into a module.
607  '''
608  from psyclone.parse.kernel import KernelProcedure
609  if not isinstance(content, KernelProcedure):
610  raise Exception(
611  "Expecting a KernelProcedure type but received " +
612  str(type(content)))
613  content.ast.parent = self.root
614  # add content after any existing subroutines
615  index = len(self.root.content) - 1
616  self.root.content.insert(index, content.ast)
617 
618 

References psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().

Here is the call graph for this function:

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