OptimizationInfo Struct Reference

#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   输出

公共成员函数

  MAXON_OPERATOR_STRUCT ( OptimizationInfo , node , portMap [0], portMap [1], outputValues )

Public Attributes

CoreNode  node
BaseArray < Int portMap [2]
BaseArray < 输出 outputValues

成员函数文档编制

◆  MAXON_OPERATOR_STRUCT()

MAXON_OPERATOR_STRUCT ( OptimizationInfo   ,
node   ,
portMap   [0],
portMap   [1],
outputValues    
)

Member Data Documentation

◆  node

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 ).

◆  portMap

BaseArray < Int > portMap[2]

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.

◆  outputValues

BaseArray < 输出 > outputValues

For each output port of the original node there must be one 输出 entry in outputValues which contains optimization info for that port.