|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.nabla.algorithmic.forward.instructions.WideningTransformer
public class WideningTransformer
Differentiation transformer for promoting a double on the stack to a differential pair.
Some instructions pushing a double on the stack simply need to be completed by pushing a 0 afterwards to form a differential pair representing a constant value. These instructions are replaced by a copy of themselves followed by a DCONST_0 instruction.
| Method Summary | |
|---|---|
static InstructionsTransformer |
getInstance()
Get the singleton instance. |
org.objectweb.asm.tree.InsnList |
getReplacement(org.objectweb.asm.tree.AbstractInsnNode insn,
MethodDifferentiator methodDifferentiator)
Get the replacement instructions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static InstructionsTransformer getInstance()
We use here the Initialization on Demand Holder idiom.
public org.objectweb.asm.tree.InsnList getReplacement(org.objectweb.asm.tree.AbstractInsnNode insn,
MethodDifferentiator methodDifferentiator)
throws DifferentiationException
getReplacement in interface InstructionsTransformerinsn - original instructionmethodDifferentiator - method differentiator driving this transformer
DifferentiationException - if the method differentiator cannot provide
a temporary variable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||