FAUST compiler  0.9.9.6b8
Functions | Variables
compile_scal.cpp File Reference
#include "compile_scal.hh"
#include "timing.hh"
#include "compile.hh"
#include "sigtype.hh"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <math.h>
#include "floats.hh"
#include "sigprint.hh"
#include "sigtyperules.hh"
#include "recursivness.hh"
#include "simplify.hh"
#include "privatise.hh"
#include "prim2.hh"
#include "xtended.hh"
#include "compatibility.hh"
#include "ppsig.hh"
#include "sigToGraph.hh"
Include dependency graph for compile_scal.cpp:

Go to the source code of this file.

Functions

string makeDrawPath ()
 
static Klasssignal2klass (Klass *parent, const string &name, Tree sig)
 
static bool isPowerOf2 (int n)
 

Variables

bool gInPlace
 
bool gDrawSignals
 
bool gLessTempSwitch
 
int gMaxCopyDelay
 
string gClassName
 
string gMasterDocument
 
bool gDumpNorm
 

Function Documentation

static bool isPowerOf2 ( int  n)
static

Definition at line 954 of file compile_scal.cpp.

Referenced by ScalarCompiler::generateIota().

955 {
956  return !(n & (n - 1));
957 }

Here is the caller graph for this function:

string makeDrawPath ( )

Definition at line 177 of file main.cpp.

References gMasterDocument, gMasterName, and gOutputDir.

Referenced by main(), and ScalarCompiler::prepare().

178 {
179  if (gOutputDir != "") {
180  return gOutputDir + "/" + gMasterName + ".dsp";
181  } else {
182  return gMasterDocument;
183  }
184 }
string gOutputDir
Definition: main.cpp:162
string gMasterDocument
Definition: main.cpp:104
string gMasterName
Definition: main.cpp:106

Here is the caller graph for this function:

static Klass* signal2klass ( Klass parent,
const string &  name,
Tree  sig 
)
static

Definition at line 65 of file compile_scal.cpp.

References ScalarCompiler::compileSingleSignal(), getCertifiedSigType(), Compiler::getClass(), and kInt.

Referenced by ScalarCompiler::generateSigGen(), and ScalarCompiler::generateStaticSigGen().

66 {
67  Type t = getCertifiedSigType(sig); //, NULLENV);
68  if (t->nature() == kInt) {
69 
70  ScalarCompiler C( new SigIntGenKlass(parent, name) );
71  C.compileSingleSignal(sig);
72  return C.getClass();
73 
74  } else {
75 
76  ScalarCompiler C( new SigFloatGenKlass(parent, name) );
77  C.compileSingleSignal(sig);
78  return C.getClass();
79 
80  }
81 }
Compile a list of FAUST signals into a scalar C++ class.
Definition: compile_scal.hh:40
Definition: sigtype.hh:54
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

string gClassName

Definition at line 158 of file main.cpp.

bool gDrawSignals

Definition at line 116 of file main.cpp.

Referenced by ScalarCompiler::prepare(), and process_cmdline().

bool gDumpNorm

Definition at line 149 of file main.cpp.

Referenced by ScalarCompiler::prepare(), and process_cmdline().

bool gInPlace
bool gLessTempSwitch

Definition at line 130 of file main.cpp.

Referenced by process_cmdline().

string gMasterDocument

Definition at line 104 of file main.cpp.

int gMaxCopyDelay