|
FAUST compiler
0.9.9.6b8
|


Public Member Functions | |
| RemainderPrim () | |
| virtual unsigned int | arity () |
| virtual bool | needCache () |
| virtual Type | infereSigType (const vector< Type > &args) |
| virtual void | sigVisit (Tree sig, sigvisitor *visitor) |
| virtual int | infereSigOrder (const vector< int > &args) |
| virtual Tree | computeSigOutput (const vector< Tree > &args) |
| virtual string | generateCode (Klass *klass, const vector< string > &args, const vector< Type > &types) |
| virtual string | generateLateq (Lateq *lateq, const vector< string > &args, const vector< Type > &types) |
Definition at line 8 of file remainderprim.cpp.
| RemainderPrim::RemainderPrim | ( | ) | [inline] |
Definition at line 13 of file remainderprim.cpp.
: xtended("remainder") {}
| virtual unsigned int RemainderPrim::arity | ( | ) | [inline, virtual] |
Implements xtended.
Definition at line 15 of file remainderprim.cpp.
Referenced by computeSigOutput(), generateCode(), generateLateq(), infereSigOrder(), and infereSigType().
{ return 2; }

| virtual Tree RemainderPrim::computeSigOutput | ( | const vector< Tree > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 33 of file remainderprim.cpp.
References arity(), isNum(), xtended::symbol(), and tree().
{
num n,m;
assert (args.size() == arity());
if (isNum(args[0],n) & isNum(args[1],m)) {
return tree(remainder(double(n), double(m)));
} else {
return tree(symbol(), args[0], args[1]);
}
}

| virtual string RemainderPrim::generateCode | ( | Klass * | klass, |
| const vector< string > & | args, | ||
| const vector< Type > & | types | ||
| ) | [inline, virtual] |
| virtual string RemainderPrim::generateLateq | ( | Lateq * | lateq, |
| const vector< string > & | args, | ||
| const vector< Type > & | types | ||
| ) | [inline, virtual] |
| virtual int RemainderPrim::infereSigOrder | ( | const vector< int > & | args | ) | [inline, virtual] |
| virtual Type RemainderPrim::infereSigType | ( | const vector< Type > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 19 of file remainderprim.cpp.
References arity(), castInterval(), and floatCast().
{
assert (args.size() == arity());
return castInterval(floatCast(args[0]|args[1]), interval()); // temporary rule !!!
}

| virtual bool RemainderPrim::needCache | ( | ) | [inline, virtual] |
| virtual void RemainderPrim::sigVisit | ( | Tree | sig, |
| sigvisitor * | visitor | ||
| ) | [inline, virtual] |
Definition at line 25 of file remainderprim.cpp.
{}
1.8.0