#include "floats.hh"
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 FLOATCAST "(" FLOATMACRO ")" |
Definition at line 25 of file floats.cpp.
#define FLOATMACRO "FAUSTFLOAT" |
Definition at line 24 of file floats.cpp.
Referenced by printfloatdef().
const char* icast | ( | ) |
Definition at line 47 of file floats.cpp.
References castname, and gFloatSize.
Referenced by ScalarCompiler::generateInput().
00047 { return castname[gFloatSize]; }
const char* ifloat | ( | ) |
Definition at line 46 of file floats.cpp.
References floatname, and gFloatSize.
Referenced by ScalarCompiler::generateFloatCast(), ScalarCompiler::generateStaticTable(), ScalarCompiler::generateTable(), DocCompiler::getTypedNames(), ScalarCompiler::getTypedNames(), and SigFloatGenKlass::println().
00046 { return floatname[gFloatSize]; }
const char* inumix | ( | ) |
suffix for numeric constants
Definition at line 44 of file floats.cpp.
References gFloatSize, and numsuffix.
Referenced by T().
const char* isuffix | ( | ) |
suffix for math functions
Definition at line 43 of file floats.cpp.
References gFloatSize, and mathsuffix.
Referenced by TanPrim::generateCode(), SqrtPrim::generateCode(), SinPrim::generateCode(), RintPrim::generateCode(), RemainderPrim::generateCode(), PowPrim::generateCode(), LogPrim::generateCode(), Log10Prim::generateCode(), FmodPrim::generateCode(), FloorPrim::generateCode(), ExpPrim::generateCode(), CosPrim::generateCode(), CeilPrim::generateCode(), AtanPrim::generateCode(), Atan2Prim::generateCode(), AsinPrim::generateCode(), AcosPrim::generateCode(), and AbsPrim::generateLateq().
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 }
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]; }
const char* xfloat | ( | ) |
Definition at line 49 of file floats.cpp.
References floatname.
Referenced by VectorCompiler::compileMultiSignal(), SchedulerCompiler::compileMultiSignal(), ScalarCompiler::compileMultiSignal(), ScalarCompiler::generateButton(), ScalarCompiler::generateCheckbox(), ScalarCompiler::generateHBargraph(), ScalarCompiler::generateHSlider(), ScalarCompiler::generateNumEntry(), ScalarCompiler::generateVBargraph(), ScalarCompiler::generateVSlider(), Klass::printComputeMethodOpenMP(), Klass::printComputeMethodScalar(), Klass::printComputeMethodScheduler(), Klass::printComputeMethodVectorFaster(), and Klass::printComputeMethodVectorSimple().
00049 { return floatname[0]; }
const char* castname[] = {FLOATCAST, "(float)", "(double)", "(quad)"} |
Definition at line 41 of file floats.cpp.
const char* floatname[] = {FLOATMACRO, "float", "double", "quad"} |
Definition at line 40 of file floats.cpp.
int gFloatSize |
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().