Mercurial > octave
diff liboctave/numeric/svd.h @ 22248:60986498af9e
svd: use std::vector instead of Matrix when a std::vector is enough.
* liboctave/numeric/svd.cc, liboctave/numeric/svd.h: Matrix<T> was
being used only to create an array for work by the fortran subroutines.
Use std::vector which is lighter but still provides RIIA idiom.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Wed, 10 Aug 2016 03:56:38 +0100 |
parents | e43199618777 |
children | da201af35c97 |
line wrap: on
line diff
--- a/liboctave/numeric/svd.h Mon Jul 18 17:46:05 2016 +0200 +++ b/liboctave/numeric/svd.h Wed Aug 10 03:56:38 2016 +0100 @@ -26,6 +26,8 @@ #include "octave-config.h" +#include "vector" + template <typename T> class svd @@ -95,12 +97,13 @@ void gesvd (char& jobu, char& jobv, octave_idx_type m, octave_idx_type n, P* tmp_data, octave_idx_type m1, DM_P* s_vec, P* u, P* vt, - octave_idx_type nrow_vt1, T& work, octave_idx_type& lwork, + octave_idx_type nrow_vt1, std::vector<P>& work, octave_idx_type& lwork, octave_idx_type& info); void gesdd (char& jobz, octave_idx_type m, octave_idx_type n, P* tmp_data, octave_idx_type m1, DM_P* s_vec, P* u, P* vt, - octave_idx_type nrow_vt1, T& work, octave_idx_type& lwork, + octave_idx_type nrow_vt1, std::vector<P>& work, + octave_idx_type& lwork, octave_idx_type* iwork, octave_idx_type& info); };