Exemple #1
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is MultiplyOperation multiply &&
            (_templateMatcher.IsOne(multiply.Factor1) || _templateMatcher.IsOne(multiply.Factor2)));
 }
Exemple #2
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is ReciprocalOperation reciprocal &&
            reciprocal.Value is DivisionOperation division &&
            _templateMatcher.IsOne(division.Dividend));
 }
Exemple #3
0
 public override bool Match(HlslTreeNode node)
 {
     return(node is MultiplyOperation multiply &&
            multiply.Factor1 is DivisionOperation division &&
            _templateMatcher.IsOne(division.Dividend));
 }