at.dms.kjc.sir
Class SIRGlobal

java.lang.Object
  extended by at.dms.kjc.sir.SIROperator
      extended by at.dms.kjc.sir.SIRStream
          extended by at.dms.kjc.sir.SIRGlobal
All Implemented Interfaces:
DeepCloneable, Finalizable, SIRCodeUnit, Serializable, Cloneable

public class SIRGlobal
extends SIRStream

This class represents a data that is available to all filters.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class at.dms.kjc.sir.SIRStream
fields, ident, init, methods, work
 
Constructor Summary
SIRGlobal()
           
 
Method Summary
 Object accept(AttributeStreamVisitor v)
           
 CType getInputType()
          Returns the input type of this.
 CType getOutputType()
          Returns the output type of this.
 int getPopForSchedule(HashMap[] counts)
          Same as getPushForSchedule, but with pop instead of push.
 int getPushForSchedule(HashMap[] counts)
          Returns the number of items pushed out of this stream in one execution of the steady-state, given the steady-state execution counts specified by (as in SIRScheduler.) Requires that contains a firing for each *filter* that contained in the hierarchy of this (does not depend on splitters / joiners.) The intent of this method is that can be calculated once for a stream graph, then the splitjoins & pipelines of the graph can be refactored, and one can still call this to get the push count of new constructs without re-invoking the scheduler.
 LIRStreamType getStreamType()
          Returns the type of this stream.
 boolean needsInit()
          Returns whether or not this class needs a call to an init function to be generated.
 boolean needsWork()
          Returns whether or not this class needs a call to a work function to be generated.
 void setWork(JMethodDeclaration newWork)
          Sets the work function.
 
Methods inherited from class at.dms.kjc.sir.SIRStream
addField, addField, addFields, addFields, addMethod, addMethods, addReplacementMethod, deepClone, deepCloneInto, getFields, getIdent, getInit, getMethods, getParams, getStreamWithNumber, getTypeNameInC, getWork, hasMethod, insideFeedbackLoop, makeEmptyInit, makeEmptyInitWork, makeEmptyWork, setFields, setIdent, setInit, setInitWithoutReplacement, setMethods, toString
 
Methods inherited from class at.dms.kjc.sir.SIROperator
assertMutable, deepCloneInto, getAncestors, getName, getNumber, getParent, getParents, getParentStructureAccess, getRelativeName, getShortIdent, hashCode, readResolve, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SIRGlobal

public SIRGlobal()
Method Detail

setWork

public void setWork(JMethodDeclaration newWork)
Description copied from class: SIRStream
Sets the work function.

Overrides:
setWork in class SIRStream

getPushForSchedule

public int getPushForSchedule(HashMap[] counts)
Description copied from class: SIRStream
Returns the number of items pushed out of this stream in one execution of the steady-state, given the steady-state execution counts specified by (as in SIRScheduler.) Requires that contains a firing for each *filter* that contained in the hierarchy of this (does not depend on splitters / joiners.) The intent of this method is that can be calculated once for a stream graph, then the splitjoins & pipelines of the graph can be refactored, and one can still call this to get the push count of new constructs without re-invoking the scheduler.

Specified by:
getPushForSchedule in class SIRStream

getPopForSchedule

public int getPopForSchedule(HashMap[] counts)
Description copied from class: SIRStream
Same as getPushForSchedule, but with pop instead of push.

Specified by:
getPopForSchedule in class SIRStream

getOutputType

public CType getOutputType()
Description copied from class: SIRStream
Returns the output type of this.

Specified by:
getOutputType in class SIRStream

getStreamType

public LIRStreamType getStreamType()
Description copied from class: SIRStream
Returns the type of this stream.

Specified by:
getStreamType in class SIRStream

getInputType

public CType getInputType()
Description copied from class: SIRStream
Returns the input type of this.

Specified by:
getInputType in class SIRStream

needsInit

public boolean needsInit()
Description copied from class: SIRStream
Returns whether or not this class needs a call to an init function to be generated. Special library functions like FileReader's and FileWriter's do not need an init call.

Overrides:
needsInit in class SIRStream

needsWork

public boolean needsWork()
Description copied from class: SIRStream
Returns whether or not this class needs a call to a work function to be generated. Special library functions like FileReader's and FileWriter's do not need a work call at the level of the Kopi IR (it is generated in C).

Overrides:
needsWork in class SIRStream

accept

public Object accept(AttributeStreamVisitor v)
Specified by:
accept in class SIROperator