comparison src/OPERATORS/op-cs-cs.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 283989f2da9b
comparison
equal deleted inserted replaced
7788:45f5faba05a2 7789:82be108cc558
28 #include "gripes.h" 28 #include "gripes.h"
29 #include "oct-obj.h" 29 #include "oct-obj.h"
30 #include "ov.h" 30 #include "ov.h"
31 #include "ov-complex.h" 31 #include "ov-complex.h"
32 #include "ov-cx-mat.h" 32 #include "ov-cx-mat.h"
33 #include "ov-flt-cx-mat.h"
33 #include "ov-typeinfo.h" 34 #include "ov-typeinfo.h"
34 #include "ops.h" 35 #include "ops.h"
35 #include "xdiv.h" 36 #include "xdiv.h"
36 #include "xpow.h" 37 #include "xpow.h"
37 38
173 174
174 return v1.complex_value () != 0.0 || v2.complex_value () != 0.0; 175 return v1.complex_value () != 0.0 || v2.complex_value () != 0.0;
175 } 176 }
176 177
177 DEFNDCATOP_FN (cs_cs, complex, complex, complex_array, complex_array, concat) 178 DEFNDCATOP_FN (cs_cs, complex, complex, complex_array, complex_array, concat)
179
180 CONVDECL (complex_to_float_complex)
181 {
182 CAST_CONV_ARG (const octave_complex&);
183
184 return new octave_float_complex_matrix (FloatComplexMatrix (1, 1, static_cast<FloatComplex>(v.complex_value ())));
185 }
178 186
179 void 187 void
180 install_cs_cs_ops (void) 188 install_cs_cs_ops (void)
181 { 189 {
182 INSTALL_UNOP (op_not, octave_complex, not); 190 INSTALL_UNOP (op_not, octave_complex, not);
208 INSTALL_BINOP (op_el_or, octave_complex, octave_complex, el_or); 216 INSTALL_BINOP (op_el_or, octave_complex, octave_complex, el_or);
209 217
210 INSTALL_CATOP (octave_complex, octave_complex, cs_cs); 218 INSTALL_CATOP (octave_complex, octave_complex, cs_cs);
211 219
212 INSTALL_ASSIGNCONV (octave_complex, octave_complex, octave_complex_matrix); 220 INSTALL_ASSIGNCONV (octave_complex, octave_complex, octave_complex_matrix);
221
222 INSTALL_CONVOP (octave_complex, octave_float_complex_matrix,
223 complex_to_float_complex);
213 } 224 }
214 225
215 /* 226 /*
216 ;;; Local Variables: *** 227 ;;; Local Variables: ***
217 ;;; mode: C++ *** 228 ;;; mode: C++ ***