NewBlockGraphNode¶
-
public final class
NewBlockGraphNode¶
Fields¶
assignedRef¶
backFlow¶
-
public TapList<NewBlockGraphArrow>
backFlow¶
diffInstruction¶
-
protected Instruction
diffInstruction¶ The final Instruction that will be generated for this node.
diffValue¶
flow¶
-
public TapList<NewBlockGraphArrow>
flow¶
fromInclude¶
-
protected Instruction
fromInclude¶ When srcInstruction comes from an include, the include’ing Instruction.
iReplic¶
-
protected int
iReplic¶ The replica number that was used to build “assignedRef” from “primRecv”.
isSparsityIntSetInstruction¶
-
public boolean
isSparsityIntSetInstruction¶ Whether this instruction is coming from computing the sparsity of differentiated instruction.
kind¶
-
protected int
kind¶ The general kind of the final Tree. In {PLAIN, INCREMENT_VARIABLE, SET_VARIABLE}.
neededMultiIter¶
-
protected IterDescriptor
neededMultiIter¶ non-null if node must be run in multi-dir style, i.e. in a loop on directions.
overwritesUsed¶
-
protected boolean
overwritesUsed¶ True if this instruction reads a value that it then overwrites. Default is true because this is safest.
plainTrees¶
-
protected TapList<Tree>
plainTrees¶ When the trees are created at NewBlockGraphNode creation time (e.g. for kind==PLAIN, as opposed to kind==SET_VARIABLE or INCREMENT_VARIABLE) this field holds the list of these trees. This holds only one Tree at the beginning, but may hold several trees after node’s are merged.
preComments¶
preCommentsBlock¶
requiresRelease¶
-
public boolean
requiresRelease¶ Special for sparsity mode. True when this is (upcoming) instruction will imply a release of block of memory or not.
srcInstruction¶
-
protected Instruction
srcInstruction¶ The primal Instruction that causes this differentiated code.
tree¶
whereMask¶
-
protected InstructionMask
whereMask¶ The where context that must be applied to the final tree.
Constructors¶
NewBlockGraphNode¶
-
protected
NewBlockGraphNode(int kind, Tree tree, IterDescriptor neededMultiIter, Instruction srcInstruction, InstructionMask whereMask)¶
Methods¶
buildInstruction¶
-
protected void
buildInstruction(SymbolTable srcSymbolTable, SymbolTable bwdSymbolTable, DifferentiationEnv adEnv, Unit diffUnit)¶
fuseWith¶
-
protected boolean
fuseWith(NewBlockGraphNode otherNode)¶ Fuses this node with the “otherNode”.
- Returns
true when this node must disappear and be merged into “otherNode”. @return false when “otherNode” must disappear and be merged into this node.
gatherMultiInstructions¶
-
protected void
gatherMultiInstructions(SymbolTable diffSymbolTable, DifferentiationEnv adEnv, Unit diffUnit)¶
interestingFuseWith¶
-
protected boolean
interestingFuseWith(NewBlockGraphNode otherNode, NewBlockGraph thisGraph)¶ - Returns
true if the fusion of “this” followed by “otherNode” is possible and profitable.