#include <corenodes_lib.h>
An Optimizer returns an OptimizationInfo when some optimization can be applied to a core node. Node compilers can take advantage of this information.
Classes | |
struct | Output |
Public Member Functions | |
MAXON_OPERATOR_STRUCT (OptimizationInfo, node, portMap[0], portMap[1], outputValues) | |
Public Attributes | |
CoreNode | node |
BaseArray< Int > | portMap [2] |
BaseArray< Output > | outputValues |
MAXON_OPERATOR_STRUCT | ( | OptimizationInfo | , |
node | , | ||
portMap | [0], | ||
portMap | [1], | ||
outputValues | |||
) |
CoreNode node |
The node to use instead of the original node (e.g. a Neg node for a Sub node which subtracts from 0). May be null if there is no need at all for a node because all outputs can be computed at compile-time or by pass-throughs (see outputValues).
If node is set, this is the port mapping from the port of the new node to the ports of the original node. portMap[Int(PORT_DIR::INPUT)] must have one entry for each input port of node, portMap[Int(PORT_DIR::OUTPUT)] must have one entry for each output port of node. E.g. if input port 0 of the new node shall be used as a substitute for input port 1 of the original node, you have to set portMap[Int(PORT_DIR::INPUT)][0] to 1.
For each output port of the original node there must be one Output entry in outputValues which contains optimization info for that port.