Real(Complex(r, i)) -> r
| 2652 | |
| 2653 | // Real(Complex(r, i)) -> r |
| 2654 | Status AlgebraicSimplifierVisitor::HandleReal(HloInstruction* real) { |
| 2655 | HloInstruction* op; |
| 2656 | if (Match(real, m::Real(m::Complex(m::Op(&op), m::Op())))) { |
| 2657 | return ReplaceInstruction(real, op); |
| 2658 | } |
| 2659 | return Status::OK(); |
| 2660 | } |
| 2661 | |
| 2662 | // Imag(Complex(r, i)) -> i |
| 2663 | Status AlgebraicSimplifierVisitor::HandleImag(HloInstruction* imag) { |