|
FAUST compiler
0.9.9.6b8
|
A Node is a tagged unions of int, double, symbol and void* used in the implementation of CTrees. More...


Go to the source code of this file.
Classes | |
| class | Node |
| Class Node = (type x (int + double + Sym + void*)) More... | |
Enumerations | |
| enum | { kIntNode, kDoubleNode, kSymNode, kPointerNode } |
| Tags used to define the type of a Node. More... | |
Functions | |
| ostream & | operator<< (ostream &s, const Node &n) |
| bool | isInt (const Node &n) |
| bool | isInt (const Node &n, int *x) |
| bool | isDouble (const Node &n) |
| bool | isDouble (const Node &n, double *x) |
| bool | isZero (const Node &n) |
| bool | isGEZero (const Node &n) |
| bool | isGTZero (const Node &n) |
| bool | isOne (const Node &n) |
| bool | isMinusOne (const Node &n) |
| bool | isNum (const Node &n) |
| bool | isSym (const Node &n) |
| bool | isSym (const Node &n, Sym *x) |
| bool | isPointer (const Node &n) |
| bool | isPointer (const Node &n, void **x) |
| const Node | addNode (const Node &x, const Node &y) |
| const Node | subNode (const Node &x, const Node &y) |
| const Node | mulNode (const Node &x, const Node &y) |
| const Node | divExtendedNode (const Node &x, const Node &y) |
| const Node | remNode (const Node &x, const Node &y) |
| const Node | minusNode (const Node &x) |
| const Node | inverseNode (const Node &x) |
| const Node | lshNode (const Node &x, const Node &y) |
| const Node | rshNode (const Node &x, const Node &y) |
| const Node | andNode (const Node &x, const Node &y) |
| const Node | orNode (const Node &x, const Node &y) |
| const Node | xorNode (const Node &x, const Node &y) |
| const Node | gtNode (const Node &x, const Node &y) |
| const Node | ltNode (const Node &x, const Node &y) |
| const Node | geNode (const Node &x, const Node &y) |
| const Node | leNode (const Node &x, const Node &y) |
| const Node | eqNode (const Node &x, const Node &y) |
| const Node | neNode (const Node &x, const Node &y) |
A Node is a tagged unions of int, double, symbol and void* used in the implementation of CTrees.
Nodes are completly described by the node.h file, there is no node.cpp file.
API:
Node(symbol("abcd")); : node with symbol content
Node(10); : node with int content
Node(3.14159); : node with double content
n->type(); : kIntNode or kDoubleNode or kSymNode
n->getInt(); : int content of n
n->getDouble(); : double content of n
n->getSym(); : symbol content of n
if (isInt(n, &i)) ... : int i = int content of n
if (isDouble(n, &f)) ... : double f = double content of n
if (isSym(n, &s)) ... : Sym s = Sym content of n
Definition in file node.hh.
| anonymous enum |
Tags used to define the type of a Node.
| Enumerator | |
|---|---|
| kIntNode | |
| kDoubleNode | |
| kSymNode | |
| kPointerNode | |
Definition at line 241 of file node.hh.
References isDouble().
Referenced by addNums().


Definition at line 250 of file node.hh.
References isDouble().
Referenced by divExtendedNums(), and inverseNode().


Definition at line 302 of file node.hh.
References isDouble().

Definition at line 296 of file node.hh.
References isDouble().

Definition at line 290 of file node.hh.
References isDouble().

Definition at line 263 of file node.hh.
References divExtendedNode().
Referenced by inverseNum().


|
inline |
Definition at line 143 of file node.hh.
References kDoubleNode, and Node::type().
Referenced by addNode(), MaxPrim::computeSigOutput(), MinPrim::computeSigOutput(), AbsPrim::computeSigOutput(), divExtendedNode(), eqNode(), geNode(), gtNode(), isBoxReal(), isNum(), isSigReal(), leNode(), ltNode(), mulNode(), neNode(), print(), sigFloatCast(), sigIntCast(), simplification(), subNode(), tree2double(), tree2float(), and tree2int().


|
inline |
Definition at line 148 of file node.hh.
References Node::getDouble(), kDoubleNode, and Node::type().

|
inline |
Definition at line 166 of file node.hh.
References Node::getDouble(), Node::getInt(), kDoubleNode, kIntNode, and Node::type().

|
inline |
Definition at line 172 of file node.hh.
References Node::getDouble(), Node::getInt(), kDoubleNode, kIntNode, and Node::type().

|
inline |
Definition at line 126 of file node.hh.
References kIntNode, and Node::type().
Referenced by CTree::calcTreeAperture(), AbsPrim::computeSigOutput(), MaxPrim::computeSigOutput(), MinPrim::computeSigOutput(), ensureFloat(), infereWaveformType(), isBoxInt(), isBoxSlot(), isNum(), isProj(), isRef(), isSigBinOp(), isSigInput(), isSigInt(), isSigOutput(), isSigTuple(), print(), sigFloatCast(), sigIntCast(), simplification(), tree2double(), tree2float(), and tree2int().


|
inline |
Definition at line 131 of file node.hh.
References Node::getInt(), kIntNode, and Node::type().

|
inline |
Definition at line 184 of file node.hh.
References Node::getDouble(), Node::getInt(), kDoubleNode, kIntNode, and Node::type().

|
inline |
Definition at line 192 of file node.hh.
References isDouble(), and isInt().

|
inline |
Definition at line 178 of file node.hh.
References Node::getDouble(), Node::getInt(), kDoubleNode, kIntNode, and Node::type().

|
inline |
Definition at line 216 of file node.hh.
References kPointerNode, and Node::type().
Referenced by isBoxPrim0(), isBoxPrim1(), isBoxPrim2(), isBoxPrim3(), isBoxPrim4(), isBoxPrim5(), print(), and tree2ptr().


|
inline |
Definition at line 221 of file node.hh.
References Node::getPointer(), kPointerNode, and Node::type().

|
inline |
Definition at line 199 of file node.hh.
References kSymNode, and Node::type().
Referenced by getUserData(), isBefore(), isBoxIdent(), isDocTxt(), normalizeLabel(), print(), and tree2str().


Definition at line 204 of file node.hh.
References Node::getSym(), kSymNode, and Node::type().

|
inline |
Definition at line 160 of file node.hh.
References Node::getDouble(), Node::getInt(), kDoubleNode, kIntNode, and Node::type().

Definition at line 299 of file node.hh.
References isDouble().

Definition at line 293 of file node.hh.
References isDouble().

Definition at line 260 of file node.hh.
References subNode().
Referenced by minusNum().


Definition at line 247 of file node.hh.
References isDouble().
Referenced by mulNums().


Definition at line 305 of file node.hh.
References isDouble().

|
inline |
Definition at line 117 of file node.hh.
References Node::print().

Definition at line 244 of file node.hh.
References isDouble().
Referenced by minusNode(), and subNums().


1.8.7