Ejemplo n.º 1
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is MultiplyOperation multiply &&
            (_templateMatcher.IsZero(multiply.Factor1) || _templateMatcher.IsZero(multiply.Factor2)));
 }
 public override bool Match(HlslTreeNode node)
 {
     return(node is SubtractOperation subtract &&
            ((_templateMatcher.IsZero(subtract.Minuend) && !_templateMatcher.IsZero(subtract.Subtrahend)) ||
             (!_templateMatcher.IsZero(subtract.Minuend) && _templateMatcher.IsZero(subtract.Subtrahend))));
 }
Ejemplo n.º 3
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is AddOperation add &&
            (_templateMatcher.IsZero(add.Addend1) || _templateMatcher.IsZero(add.Addend2)));
 }