Dataflow Software Stack  032db78
Master Thesis of Mathijs Saey at the VUB
 All Classes Namespaces Files Functions Variables Pages
Functions | Variables
frontEnd.IF1.converter Namespace Reference

Functions

def checkLowerBound
 See if a port utilizes a correct lower bound of an array. More...
 
def removeInputPort
 Remove the first input port of a node. More...
 
def convertABuild
 Convert ABuild. More...
 
def convertAFill
 Convert AFill. More...
 
def convertAGather
 Convert AGather. More...
 
def convertAScatter
 Convert AScatter. More...
 
def convertALimL
 Convert ALimL. More...
 
def convertASetL
 A lower bound of an array cannot be changed in DVM. More...
 
def convertCall
 Convert a call operation to a call node. More...
 
def convertLessChain
 Convert 'less chains'. More...
 
def convertLess
 Convert a less chain: not smaller => greater or eq. More...
 
def convertLessEq
 Convert a less chain: not smaller or eq => greater. More...
 
def checkNode
 
def run
 

Variables

tuple log = logging.getLogger(__name__)
 
dictionary conversions
 

Function Documentation

def frontEnd.IF1.converter.checkLowerBound (   port,
  valid 
)

See if a port utilizes a correct lower bound of an array.

def frontEnd.IF1.converter.removeInputPort (   node)

Remove the first input port of a node.

Update the indices of the other ports to reflect this.

def frontEnd.IF1.converter.convertABuild (   node)

Convert ABuild.

This operation remains relatively unchanged, we just remove the lower bound of the build operation.d We also emit a warning if the lower bound is not 0.

def frontEnd.IF1.converter.convertAFill (   node)

Convert AFill.

See also
convertABuild
def frontEnd.IF1.converter.convertAGather (   node)

Convert AGather.

Gathers only occur in the returns subgraph of compound nodes. This has different semantics in DVM.

The actual instruction that constructs the array is added during the compilation of the compound node. Thus, we can remove the gather operation if it only does this. If it also filters out a part of the array, a prune instruction is added to do the actual filtering.

def frontEnd.IF1.converter.convertAScatter (   node)

Convert AScatter.

There is no concept of a scatter opertaion in DVM. Instead a Split operation provides this functionality. The split is added when compiling the compound node.

def frontEnd.IF1.converter.convertALimL (   node)

Convert ALimL.

A DVM array always has a lower bound of 0. So we eliminate this node and add 0 as a literal.

def frontEnd.IF1.converter.convertASetL (   node)

A lower bound of an array cannot be changed in DVM.

Thus we remove this operation. We also return an error if the bound was set to anything that is not 0

def frontEnd.IF1.converter.convertCall (   node)

Convert a call operation to a call node.

def frontEnd.IF1.converter.convertLessChain (   node,
  replacement 
)

Convert 'less chains'.

IF1 does not define a more or moreEq, instead it adds a not after a < or =< This method looks for such a chain and replaces it if possible.

def frontEnd.IF1.converter.convertLess (   node)

Convert a less chain: not smaller => greater or eq.

def frontEnd.IF1.converter.convertLessEq (   node)

Convert a less chain: not smaller or eq => greater.

def frontEnd.IF1.converter.checkNode (   node)
def frontEnd.IF1.converter.run ( )

Variable Documentation

tuple frontEnd.IF1.converter.log = logging.getLogger(__name__)
dictionary frontEnd.IF1.converter.conversions
Initial value:
1 = {
2  'ABuild' : convertABuild,
3  'AFill' : convertAFill,
4  'AGather' : convertAGather,
5  'AScatter' : convertAScatter,
6  'ALimL' : convertALimL,
7  'ASetL' : convertASetL,
8  'Call' : convertCall,
9  'less' : convertLess,
10  'lessEq' : convertLessEq
11 }