Mercurial > hg > octave-terminal
changeset 9235:b03953732530
Copy volatile variable to avoid MSVC compilation error
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Thu, 21 May 2009 21:07:36 +0100 |
parents | e2f6dcade4c6 |
children | c02224afead6 |
files | liboctave/ChangeLog liboctave/CmplxQR.cc liboctave/dbleQR.cc liboctave/fCmplxQR.cc liboctave/floatQR.cc |
diffstat | 5 files changed, 32 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,13 @@ 2009-05-21 Michael Goffioul <michael.goffioul@gmail.com> + * CmplxQR.cc (ComplexQR::insert_col, ComplexQR::delete_col): Copy + volatile variable to avoid MSVC compilation error (cannot pass + volatile variable as const& argument). + * dbleQR.cc (QR::insert_col, QR::delete_col): Ditto. + * fCmplxQR.cc (FloatComplexQR::insert_col, + FloatComplexQR::delete_col): Ditto. + * floatQR.cc (FloatQR::insert_col, FloatQR::delete_col): Ditto. + * oct-mutex.cc: Exclude pthread.h inclusion under Win32. * base-aepbal.h (base_aepbal::operator=): Add missing return
--- a/liboctave/CmplxQR.cc +++ b/liboctave/CmplxQR.cc @@ -323,10 +323,11 @@ OCTAVE_LOCAL_BUFFER (double, rw, kmax); for (volatile octave_idx_type i = 0; i < js.length (); i++) { + octave_idx_type ii = i; ComplexColumnVector utmp = u.column (jsi(i)); - F77_XFCN (zqrinc, ZQRINC, (m, n + i, std::min (kmax, k + i), + F77_XFCN (zqrinc, ZQRINC, (m, n + ii, std::min (kmax, k + ii), q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, + r.fortran_vec (), r.rows (), js(ii) + 1, utmp.data (), rw)); } } @@ -382,9 +383,10 @@ OCTAVE_LOCAL_BUFFER (double, rw, k); for (volatile octave_idx_type i = 0; i < js.length (); i++) { - F77_XFCN (zqrdec, ZQRDEC, (m, n - i, k == m ? k : k - i, + octave_idx_type ii = i; + F77_XFCN (zqrdec, ZQRDEC, (m, n - ii, k == m ? k : k - ii, q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, rw)); + r.fortran_vec (), r.rows (), js(ii) + 1, rw)); } if (k < m) {
--- a/liboctave/dbleQR.cc +++ b/liboctave/dbleQR.cc @@ -319,10 +319,11 @@ OCTAVE_LOCAL_BUFFER (double, w, kmax); for (volatile octave_idx_type i = 0; i < js.length (); i++) { + octave_idx_type ii = i; ColumnVector utmp = u.column (jsi(i)); - F77_XFCN (dqrinc, DQRINC, (m, n + i, std::min (kmax, k + i), + F77_XFCN (dqrinc, DQRINC, (m, n + ii, std::min (kmax, k + ii), q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, + r.fortran_vec (), r.rows (), js(ii) + 1, utmp.data (), w)); } } @@ -378,9 +379,10 @@ OCTAVE_LOCAL_BUFFER (double, w, k); for (volatile octave_idx_type i = 0; i < js.length (); i++) { - F77_XFCN (dqrdec, DQRDEC, (m, n - i, k == m ? k : k - i, + octave_idx_type ii = i; + F77_XFCN (dqrdec, DQRDEC, (m, n - ii, k == m ? k : k - ii, q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, w)); + r.fortran_vec (), r.rows (), js(ii) + 1, w)); } if (k < m) {
--- a/liboctave/fCmplxQR.cc +++ b/liboctave/fCmplxQR.cc @@ -323,9 +323,10 @@ OCTAVE_LOCAL_BUFFER (float, rw, kmax); for (volatile octave_idx_type i = 0; i < js.length (); i++) { - F77_XFCN (cqrinc, CQRINC, (m, n + i, std::min (kmax, k + i), + octave_idx_type ii = i; + F77_XFCN (cqrinc, CQRINC, (m, n + ii, std::min (kmax, k + ii), q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, + r.fortran_vec (), r.rows (), js(ii) + 1, u.column (jsi(i)).data (), rw)); } } @@ -381,9 +382,10 @@ OCTAVE_LOCAL_BUFFER (float, rw, k); for (volatile octave_idx_type i = 0; i < js.length (); i++) { - F77_XFCN (cqrdec, CQRDEC, (m, n - i, k == m ? k : k - i, + octave_idx_type ii = i; + F77_XFCN (cqrdec, CQRDEC, (m, n - ii, k == m ? k : k - ii, q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, rw)); + r.fortran_vec (), r.rows (), js(ii) + 1, rw)); } if (k < m) {
--- a/liboctave/floatQR.cc +++ b/liboctave/floatQR.cc @@ -319,10 +319,11 @@ OCTAVE_LOCAL_BUFFER (float, w, kmax); for (volatile octave_idx_type i = 0; i < js.length (); i++) { + octave_idx_type ii = i; FloatColumnVector utmp = u.column (jsi(i)); - F77_XFCN (sqrinc, SQRINC, (m, n + i, std::min (kmax, k + i), + F77_XFCN (sqrinc, SQRINC, (m, n + ii, std::min (kmax, k + ii), q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, + r.fortran_vec (), r.rows (), js(ii) + 1, utmp.data (), w)); } } @@ -378,9 +379,10 @@ OCTAVE_LOCAL_BUFFER (float, w, k); for (volatile octave_idx_type i = 0; i < js.length (); i++) { - F77_XFCN (sqrdec, SQRDEC, (m, n - i, k == m ? k : k - i, + octave_idx_type ii = i; + F77_XFCN (sqrdec, SQRDEC, (m, n - ii, k == m ? k : k - ii, q.fortran_vec (), q.rows (), - r.fortran_vec (), r.rows (), js(i) + 1, w)); + r.fortran_vec (), r.rows (), js(ii) + 1, w)); } if (k < m) {