示例#1
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is NegateOperation negate && _templateMatcher.IsConstant(negate.Value));
 }
 public override bool Match(HlslTreeNode node)
 {
     return(node is MultiplyOperation multiply &&
            _templateMatcher.IsConstant(multiply.Factor1) &&
            _templateMatcher.IsConstant(multiply.Factor2));
 }
示例#3
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is AddOperation add &&
            _templateMatcher.IsConstant(add.Addend1) &&
            _templateMatcher.IsConstant(add.Addend2));
 }