BlockIt
blockit::Fortran::funcs Namespace Reference

Functions

def buildSTL
def propagateTemplateDeps
def templateMRO
def realizeTemplates

Variables

list __all__
string header

Function Documentation

def blockit::Fortran::funcs::buildSTL (   fileTable,
  globalTable,
  destDir = None 
)
Build a Standard Template Library from all the templated modules within
the fileTable.  This is necessary because you can run into circular
dependencies between files based on template instantiations.  Therefore,
you either need to create a separate file for each instantiation or you
can put them within a single file and order them appropriately.  The
latter is the current method.

fileTable : symbol table containing all the files
globalTable: global symbol table
breakOut: boolean on whether to create multiple files or a single STL file [False]

Definition at line 41 of file funcs.py.

def blockit::Fortran::funcs::propagateTemplateDeps (   nonTempBlocks,
  tempBlocks,
  IgnoreSymbols = ASet() 
)
Propagate template parameters from non-templated blocks that instantiate a
templated type to the parent templated block, i.e. the block at the root
of a nested sequence of blocks (e.g. a templated module will have all
blocks under it templated).

nonTempBlocks : symbol table of blocks that are not templated and
                have template dependencies

tempBlocks : complete (all blocks expanded) symbol table of blocks that are
             templated
IgnoreSymbols: a set of symbols that should not be propagated and instantiated.

Definition at line 99 of file funcs.py.

def blockit::Fortran::funcs::realizeTemplates (   table,
  cache,
  IgnoreSymbols = ASet() 
)
Find all the root templated blocks and loop through them:

table : global symbol table
lib : FortranLibrary CacheManager object

Logic
-----
1. Resolve their objects (i.e. any wildcards and such).

2. Begin main loop and propagate these objects to their children and
discover any new types that are created from the templates internally.

3. Propagate these new types to their corresponding template blocks
objects sets.

4. Goto to 2 and repeat until no object sets of any template have changed
in any of the templated types.

Returns a new SymbolTable() with the instantiated templates.

Definition at line 216 of file funcs.py.

def blockit::Fortran::funcs::templateMRO (   caller,
  tmp,
  spec,
  sig = None 
)
Given a list of blocks, a template spec and a optional
function/subroutine signature, find the block that matches.

Definition at line 158 of file funcs.py.


Variable Documentation

Initial value:
00001 ['propagateTemplateDeps',
00002            'realizeTemplates',
00003            'buildSTL']

Definition at line 17 of file funcs.py.

Initial value:
00001 '''!...............................................................................
00002 !.
00003 !. This code was pre-parsed by PyF95++, a block parser and code generator.
00004 !.
00005 !................................................................................'''

Definition at line 33 of file funcs.py.

 All Classes Namespaces Files Functions Variables Properties