|
FAUST compiler
0.9.9.6b8
|


Public Member Functions | |
| Atan2Prim () | |
| 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 7 of file atan2prim.cpp.
| Atan2Prim::Atan2Prim | ( | ) | [inline] |
Definition at line 12 of file atan2prim.cpp.
: xtended("atan2") {}
| virtual unsigned int Atan2Prim::arity | ( | ) | [inline, virtual] |
Implements xtended.
Definition at line 14 of file atan2prim.cpp.
Referenced by generateCode(), and generateLateq().
{ return 2; }

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

| virtual string Atan2Prim::generateCode | ( | Klass * | klass, |
| const vector< string > & | args, | ||
| const vector< Type > & | types | ||
| ) | [inline, virtual] |
| virtual string Atan2Prim::generateLateq | ( | Lateq * | lateq, |
| const vector< string > & | args, | ||
| const vector< Type > & | types | ||
| ) | [inline, virtual] |
| virtual int Atan2Prim::infereSigOrder | ( | const vector< int > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 26 of file atan2prim.cpp.
References max().
{
return max(args[0], args[1]);
}

| virtual Type Atan2Prim::infereSigType | ( | const vector< Type > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 18 of file atan2prim.cpp.
References floatCast().
{
assert (args.size() == 2);
return floatCast(args[0]|args[1]);
}

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