diff src/OPERATORS/op-cm-cm.cc @ 7789:82be108cc558

First attempt at single precision tyeps * * * corrections to qrupdate single precision routines * * * prefer demotion to single over promotion to double * * * Add single precision support to log2 function * * * Trivial PROJECT file update * * * Cache optimized hermitian/transpose methods * * * Add tests for tranpose/hermitian and ChangeLog entry for new transpose code
author David Bateman <dbateman@free.fr>
date Sun, 27 Apr 2008 22:34:17 +0200
parents a1dbe9d80eee
children 5861b95e9879
line wrap: on
line diff
--- a/src/OPERATORS/op-cm-cm.cc	Wed May 14 18:09:56 2008 +0200
+++ b/src/OPERATORS/op-cm-cm.cc	Sun Apr 27 22:34:17 2008 +0200
@@ -29,6 +29,7 @@
 #include "oct-obj.h"
 #include "ov.h"
 #include "ov-cx-mat.h"
+#include "ov-flt-cx-mat.h"
 #include "ov-typeinfo.h"
 #include "ops.h"
 #include "xdiv.h"
@@ -131,6 +132,13 @@
 
 DEFNDASSIGNOP_FN (assign, complex_matrix, complex_matrix, complex_array, assign)
 
+CONVDECL (complex_matrix_to_float_complex_matrix)
+{
+  CAST_CONV_ARG (const octave_complex_matrix&);
+
+  return new octave_float_complex_matrix (FloatComplexNDArray (v.complex_array_value ()));
+}
+
 void
 install_cm_cm_ops (void)
 {
@@ -165,6 +173,9 @@
   INSTALL_CATOP (octave_complex_matrix, octave_complex_matrix, cm_cm);
 
   INSTALL_ASSIGNOP (op_asn_eq, octave_complex_matrix, octave_complex_matrix, assign);
+
+  INSTALL_CONVOP (octave_complex_matrix, octave_float_complex_matrix, 
+		  complex_matrix_to_float_complex_matrix);
 }
 
 /*