[Pkg-octave-commit] [SCM] Debian packaging for octave branch, master, updated. debian/3.6.4-1
Sébastien Villemot
sebastien.villemot at ens.fr
Wed May 8 18:01:06 UTC 2013
The following commit has been merged in the master branch:
commit b00bebef0258aa34f5884ce93988321897036201
Author: Sébastien Villemot <sebastien.villemot at ens.fr>
Date: Fri Sep 14 10:47:53 2012 +0200
rcond.patch: new patch taken from upstream, fixes rcond function
diff --git a/debian/patches/rcond.patch b/debian/patches/rcond.patch
new file mode 100644
index 0000000..45dcecc
--- /dev/null
+++ b/debian/patches/rcond.patch
@@ -0,0 +1,210 @@
+Description: Fix rcond function
+ Use new copy of data for full factorization if positive definite cholesky
+ factorization fails.
+Origin: upstream, http://hg.savannah.gnu.org/hgweb/octave/rev/197774b411ec
+Bug: http://savannah.gnu.org/bugs/?37336
+Applied-Upstream: version, 3.6.4
+Last-Update: 2012-09-14
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff --git a/liboctave/CMatrix.cc b/liboctave/CMatrix.cc
+--- a/liboctave/CMatrix.cc
++++ b/liboctave/CMatrix.cc
+@@ -1786,13 +1786,15 @@
+ else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
+ {
+ double anorm = -1.0;
+- ComplexMatrix atmp = *this;
+- Complex *tmp_data = atmp.fortran_vec ();
+
+ if (typ == MatrixType::Hermitian)
+ {
+ octave_idx_type info = 0;
+ char job = 'L';
++
++ ComplexMatrix atmp = *this;
++ Complex *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().
+ row(static_cast<octave_idx_type>(0)).max();
+
+@@ -1829,6 +1831,9 @@
+ {
+ octave_idx_type info = 0;
+
++ ComplexMatrix atmp = *this;
++ Complex *tmp_data = atmp.fortran_vec ();
++
+ Array<octave_idx_type> ipvt (dim_vector (nr, 1));
+ octave_idx_type *pipvt = ipvt.fortran_vec ();
+
+@@ -2098,8 +2103,10 @@
+ {
+ info = 0;
+ char job = 'L';
++
+ ComplexMatrix atmp = *this;
+ Complex *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
+
+ F77_XFCN (zpotrf, ZPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
+diff --git a/liboctave/dMatrix.cc b/liboctave/dMatrix.cc
+--- a/liboctave/dMatrix.cc
++++ b/liboctave/dMatrix.cc
+@@ -1454,13 +1454,15 @@
+ else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
+ {
+ double anorm = -1.0;
+- Matrix atmp = *this;
+- double *tmp_data = atmp.fortran_vec ();
+
+ if (typ == MatrixType::Hermitian)
+ {
+ octave_idx_type info = 0;
+ char job = 'L';
++
++ Matrix atmp = *this;
++ double *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().
+ row(static_cast<octave_idx_type>(0)).max();
+
+@@ -1495,6 +1497,9 @@
+ {
+ octave_idx_type info = 0;
+
++ Matrix atmp = *this;
++ double *tmp_data = atmp.fortran_vec ();
++
+ Array<octave_idx_type> ipvt (dim_vector (nr, 1));
+ octave_idx_type *pipvt = ipvt.fortran_vec ();
+
+@@ -1760,8 +1765,10 @@
+ {
+ info = 0;
+ char job = 'L';
++
+ Matrix atmp = *this;
+ double *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
+
+ F77_XFCN (dpotrf, DPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
+@@ -1838,6 +1845,7 @@
+
+ Matrix atmp = *this;
+ double *tmp_data = atmp.fortran_vec ();
++
+ if(anorm < 0.)
+ anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
+
+diff --git a/liboctave/fCMatrix.cc b/liboctave/fCMatrix.cc
+--- a/liboctave/fCMatrix.cc
++++ b/liboctave/fCMatrix.cc
+@@ -1782,13 +1782,15 @@
+ else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
+ {
+ float anorm = -1.0;
+- FloatComplexMatrix atmp = *this;
+- FloatComplex *tmp_data = atmp.fortran_vec ();
+
+ if (typ == MatrixType::Hermitian)
+ {
+ octave_idx_type info = 0;
+ char job = 'L';
++
++ FloatComplexMatrix atmp = *this;
++ FloatComplex *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().
+ row(static_cast<octave_idx_type>(0)).max();
+
+@@ -1825,6 +1827,9 @@
+ {
+ octave_idx_type info = 0;
+
++ FloatComplexMatrix atmp = *this;
++ FloatComplex *tmp_data = atmp.fortran_vec ();
++
+ Array<octave_idx_type> ipvt (dim_vector (nr, 1));
+ octave_idx_type *pipvt = ipvt.fortran_vec ();
+
+@@ -2094,8 +2099,10 @@
+ {
+ info = 0;
+ char job = 'L';
++
+ FloatComplexMatrix atmp = *this;
+ FloatComplex *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
+
+ F77_XFCN (cpotrf, CPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
+diff --git a/liboctave/fMatrix.cc b/liboctave/fMatrix.cc
+--- a/liboctave/fMatrix.cc
++++ b/liboctave/fMatrix.cc
+@@ -1454,13 +1454,15 @@
+ else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
+ {
+ float anorm = -1.0;
+- FloatMatrix atmp = *this;
+- float *tmp_data = atmp.fortran_vec ();
+
+ if (typ == MatrixType::Hermitian)
+ {
+ octave_idx_type info = 0;
+ char job = 'L';
++
++ FloatMatrix atmp = *this;
++ float *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().
+ row(static_cast<octave_idx_type>(0)).max();
+
+@@ -1495,6 +1497,9 @@
+ {
+ octave_idx_type info = 0;
+
++ FloatMatrix atmp = *this;
++ float *tmp_data = atmp.fortran_vec ();
++
+ Array<octave_idx_type> ipvt (dim_vector (nr, 1));
+ octave_idx_type *pipvt = ipvt.fortran_vec ();
+
+@@ -1760,8 +1765,10 @@
+ {
+ info = 0;
+ char job = 'L';
++
+ FloatMatrix atmp = *this;
+ float *tmp_data = atmp.fortran_vec ();
++
+ anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
+
+ F77_XFCN (spotrf, SPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
+@@ -1838,6 +1845,7 @@
+
+ FloatMatrix atmp = *this;
+ float *tmp_data = atmp.fortran_vec ();
++
+ if(anorm < 0.)
+ anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
+
+diff --git a/src/DLD-FUNCTIONS/rcond.cc b/src/DLD-FUNCTIONS/rcond.cc
+--- a/src/DLD-FUNCTIONS/rcond.cc
++++ b/src/DLD-FUNCTIONS/rcond.cc
+@@ -93,4 +93,12 @@
+ %!assert( rcond ([1 1; 2 1]), 1/9)
+ %!assert( rcond (magic (4)), 0, eps)
+
++%!shared x, sx
++%! x = [-5.25, -2.25; -2.25, 1] * eps () + ones (2) / 2;
++%! sx = [-5.25, -2.25; -2.25, 1] * eps ("single") + ones (2) / 2;
++%!assert (rcond (x) < eps ());
++%!assert (rcond (sx) < eps ('single'));
++%!assert (rcond (x*i) < eps ());
++%!assert (rcond (sx*i) < eps ('single'));
++
+ */
+
diff --git a/debian/patches/series b/debian/patches/series
index a40c692..5b50072 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ correct_typos
use_system_gl2ps
drop_version_from_mkoctfile_function_call
mkoctfile-mpi.diff
+rcond.patch
--
Debian packaging for octave
More information about the Pkg-octave-commit
mailing list