changeset 31318:eba9d6d4cc41

Backed out changeset 83e47ccf34ac
author Arun Giridhar <arungiridhar@gmail.com>
date Wed, 19 Oct 2022 12:13:57 -0400
parents 83e47ccf34ac
children 6cf02f842e74
files libinterp/operators/op-cs-scm.cc libinterp/operators/op-fcm-fcm.cc libinterp/operators/op-s-m.cc
diffstat 3 files changed, 6 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/operators/op-cs-scm.cc	Mon Oct 17 19:11:16 2022 -0400
+++ b/libinterp/operators/op-cs-scm.cc	Wed Oct 19 12:13:57 2022 -0400
@@ -81,10 +81,7 @@
   const octave_sparse_complex_matrix& v2
     = dynamic_cast<const octave_sparse_complex_matrix&> (a2);
 
-  const auto& tmp1 = v1.complex_value ();
-  const auto& tmp2 = v2.sparse_complex_matrix_value ();
-  const auto& tmp3 = tmp2 / tmp1;
-  return octave_value (tmp3);
+  return octave_value (v2.sparse_complex_matrix_value () / v1.complex_value ());
 }
 
 DEFBINOP_FN (lt, complex, sparse_complex_matrix, mx_el_lt)
@@ -105,10 +102,7 @@
   const octave_sparse_complex_matrix& v2
     = dynamic_cast<const octave_sparse_complex_matrix&> (a2);
 
-  const auto& tmp1 = v1.complex_value ();
-  const auto& tmp2 = v2.sparse_complex_matrix_value ();
-  const auto& tmp3 = tmp2 / tmp1;
-  return octave_value (tmp3);
+  return octave_value (v2.sparse_complex_matrix_value () / v1.complex_value ());
 }
 
 DEFBINOP_FN (el_and, complex, sparse_complex_matrix, mx_el_and)
--- a/libinterp/operators/op-fcm-fcm.cc	Mon Oct 17 19:11:16 2022 -0400
+++ b/libinterp/operators/op-fcm-fcm.cc	Wed Oct 19 12:13:57 2022 -0400
@@ -54,9 +54,7 @@
   if (v.ndims () > 2)
     error ("transpose not defined for N-D objects");
 
-  const auto& tmp = v.float_complex_matrix_value ();
-  const auto& tmp2 = tmp.transpose ();
-  return octave_value (tmp2);
+  return octave_value (v.float_complex_matrix_value ().transpose ());
 }
 
 DEFUNOP (hermitian, float_complex_matrix)
@@ -67,9 +65,7 @@
   if (v.ndims () > 2)
     error ("complex-conjugate transpose not defined for N-D objects");
 
-  const auto& tmp = v.float_complex_matrix_value ();
-  const auto& tmp2 = tmp.hermitian ();
-  return octave_value (tmp2);
+  return octave_value (v.float_complex_matrix_value ().hermitian ());
 }
 
 DEFNCUNOP_METHOD (incr, float_complex_matrix, increment)
--- a/libinterp/operators/op-s-m.cc	Mon Oct 17 19:11:16 2022 -0400
+++ b/libinterp/operators/op-s-m.cc	Wed Oct 19 12:13:57 2022 -0400
@@ -68,10 +68,7 @@
   const octave_scalar& v1 = dynamic_cast<const octave_scalar&> (a1);
   const octave_matrix& v2 = dynamic_cast<const octave_matrix&> (a2);
 
-  const auto& tmp1 = v1.double_value ();
-  const auto& tmp2 = v2.array_value ();
-  const auto& tmp3 = tmp2 / tmp1;
-  return octave_value (tmp3);
+  return octave_value (v2.array_value () / v1.double_value ());
 }
 
 DEFNDBINOP_FN (lt, scalar, matrix, scalar, array, mx_el_lt)
@@ -90,10 +87,7 @@
   const octave_scalar& v1 = dynamic_cast<const octave_scalar&> (a1);
   const octave_matrix& v2 = dynamic_cast<const octave_matrix&> (a2);
 
-  const auto& tmp1 = v1.double_value ();
-  const auto& tmp2 = v2.array_value ();
-  const auto& tmp3 = tmp2 / tmp1;
-  return octave_value (tmp3);
+  return octave_value (v2.array_value () / v1.double_value ());
 }
 
 DEFNDBINOP_FN (el_and, scalar, matrix, scalar, array, mx_el_and)