at.dms.kjc.vanillaSlice
Class EmitStandaloneCode
java.lang.Object
at.dms.kjc.backendSupport.EmitCode
at.dms.kjc.vanillaSlice.EmitStandaloneCode
public class EmitStandaloneCode
- extends EmitCode
Takes a ComputeNode collection, a collection of Channel's,
and a mapping from Channel x end -> ComputeNode and emits code for the ComputeNode.
Most work in superclass.
- Author:
- dimock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmitStandaloneCode
public EmitStandaloneCode(BackEndFactory<UniProcessors,UniProcessor,UniComputeCodeStore,Integer> backendbits)
- Constructor.
- Parameters:
backendbits
- indicates BackEndFactory containing all useful info.
emitTypedefs
public static void emitTypedefs(SIRStructure[] structs,
BackEndFactory backendbits,
CodegenPrintWriter p)
- Create typedefs and other general header info.
- Parameters:
structs
- Structures detected by front end.backendbits
- BackEndFactory to get access to rest of code.p
- a CodeGenPrintWriter on which to emit the C code.
generateCHeader
public void generateCHeader(CodegenPrintWriter p)
- Standard code for front of a C file here.
- Overrides:
generateCHeader
in class EmitCode
generateMain
public void generateMain(CodegenPrintWriter p)
- Generate a "main" function.
Override!
- Overrides:
generateMain
in class EmitCode