floats.cpp File Reference

#include "floats.hh"
Include dependency graph for floats.cpp:

Go to the source code of this file.

Defines

#define FLOATMACRO   "FAUSTFLOAT"
#define FLOATCAST   "(" FLOATMACRO ")"

Functions

const char * isuffix ()
 suffix for math functions
const char * inumix ()
 suffix for numeric constants
const char * ifloat ()
const char * icast ()
const char * xfloat ()
const char * xcast ()
void printfloatdef (std::ostream &fout)

Variables

int gFloatSize
const char * mathsuffix [] = {"", "f", "", "l"}
const char * numsuffix [] = {"", "f", "", ""}
const char * floatname [] = {FLOATMACRO, "float", "double", "quad"}
const char * castname [] = {FLOATCAST, "(float)", "(double)", "(quad)"}

Define Documentation

#define FLOATCAST   "(" FLOATMACRO ")"

Definition at line 25 of file floats.cpp.

#define FLOATMACRO   "FAUSTFLOAT"

Definition at line 24 of file floats.cpp.

Referenced by printfloatdef().


Function Documentation

const char* icast (  ) 

Definition at line 47 of file floats.cpp.

References castname, and gFloatSize.

Referenced by ScalarCompiler::generateInput().

00047 { return castname[gFloatSize]; }

Here is the caller graph for this function:

const char* ifloat (  ) 
const char* inumix (  ) 

suffix for numeric constants

Definition at line 44 of file floats.cpp.

References gFloatSize, and numsuffix.

Referenced by T().

Here is the caller graph for this function:

const char* isuffix (  ) 
void printfloatdef ( std::ostream &  fout  ) 

Definition at line 52 of file floats.cpp.

References FLOATMACRO.

Referenced by main().

00053 {
00054     fout << "#ifndef " << FLOATMACRO << std::endl;
00055     fout << "#define " << FLOATMACRO << " " << "float" << std::endl;
00056     fout << "#endif  " << std::endl;
00057     fout << std::endl;
00058     fout << "typedef long double quad;" << std::endl;
00059 }

Here is the caller graph for this function:

const char* xcast (  ) 

Definition at line 50 of file floats.cpp.

References castname.

Referenced by VectorCompiler::compileMultiSignal(), SchedulerCompiler::compileMultiSignal(), ScalarCompiler::compileMultiSignal(), and ScalarCompiler::generateOutput().

00050 { return castname[0]; }

Here is the caller graph for this function:

const char* xfloat (  ) 

Variable Documentation

const char* castname[] = {FLOATCAST, "(float)", "(double)", "(quad)"}

Definition at line 41 of file floats.cpp.

Referenced by icast(), and xcast().

const char* floatname[] = {FLOATMACRO, "float", "double", "quad"}

Definition at line 40 of file floats.cpp.

Referenced by ifloat(), and xfloat().

Definition at line 149 of file main.cpp.

Referenced by icast(), ifloat(), inumix(), isuffix(), and process_cmdline().

const char* mathsuffix[] = {"", "f", "", "l"}

Definition at line 38 of file floats.cpp.

Referenced by isuffix().

const char* numsuffix[] = {"", "f", "", ""}

Definition at line 39 of file floats.cpp.

Referenced by inumix().

Generated on Thu Jul 15 16:15:40 2010 for FAUST compiler by  doxygen 1.6.3