comparison liboctave/dColVector.cc @ 14394:ed8c4921bf61 stable

correctly fill result for M * v for Nx0 * 0x1 operations * dColVector.cc (operator * (const Matrix&, const ColumnVector&)): Fill result if NC is 0. * CColVector.cc (operator * (const ComplexMatrix&, const ComplexColumnVector&)): Likewise. * fCColVector.cc (const FloatComplexMatrix&, const FloatComplexColumnVector&)): Likewise. * fColVector.cc (const FloatMatrix&, const FloatColumnVector&)): Likewise.
author John W. Eaton <jwe@octave.org>
date Thu, 23 Feb 2012 13:50:26 -0500
parents 72c96de7a403
children 460a3c6d8bf1
comparison
equal deleted inserted replaced
14393:ba4d6343524b 14394:ed8c4921bf61
210 { 210 {
211 retval.clear (nr); 211 retval.clear (nr);
212 212
213 if (nr != 0) 213 if (nr != 0)
214 { 214 {
215 double *y = retval.fortran_vec (); 215 if (nc == 0)
216 216 retval.fill (0.0);
217 F77_XFCN (dgemv, DGEMV, (F77_CONST_CHAR_ARG2 ("N", 1), 217 else
218 nr, nc, 1.0, m.data (), nr, 218 {
219 a.data (), 1, 0.0, y, 1 219 double *y = retval.fortran_vec ();
220 F77_CHAR_ARG_LEN (1))); 220
221 F77_XFCN (dgemv, DGEMV, (F77_CONST_CHAR_ARG2 ("N", 1),
222 nr, nc, 1.0, m.data (), nr,
223 a.data (), 1, 0.0, y, 1
224 F77_CHAR_ARG_LEN (1)));
225 }
221 } 226 }
222 } 227 }
223 228
224 return retval; 229 return retval;
225 } 230 }