[Pkg-octave-commit] [SCM] Debian packaging for octave branch, experimental, updated. debian/3.6.3-2-9-ga58cd1e

Sébastien Villemot sebastien at debian.org
Sat Feb 23 21:37:12 UTC 2013


The following commit has been merged in the experimental branch:
commit 3882ab4ff791719297efd90e3e85b3f7fdc0b8d5
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Sat Feb 23 18:44:24 2013 +0100

    Remove patches applied upstream:
    
     + rcond.patch
     + fix-sparse-unit-testing.patch

diff --git a/debian/patches/fix-sparse-unit-testing.patch b/debian/patches/fix-sparse-unit-testing.patch
deleted file mode 100644
index 4e02246..0000000
--- a/debian/patches/fix-sparse-unit-testing.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-Description: Fix unit testing in the Sparse.cc file
- This patch is a combination of two commits taken from the upstream Mercurial
- repository.  Here are their descriptions:
- .
- # HG changeset patch
- # User David Bateman <dbateman at free.fr>
- # Date 1337385561 -7200
- # Node ID f2e72944847b9ec7cec586faa4c72ea91eb53881
- # Parent  997e05334f71269f16017ceb06a52cf33feced18
- Ensure sparse constructors have valid ridx and data indices even if they are
- zero matrices (bug #36104)
- .
- # HG changeset patch
- # User John W. Eaton <jwe at octave.org>
- # Date 1340304125 14400
- # Node ID 4663cc835c65873fe12b599bcab11ba4a8f5fb87
- # Parent  f2e72944847b9ec7cec586faa4c72ea91eb53881
- Special-case removing rows or columns from empty sparse matrices
-Author: Rafael Laboissiere <rafael at laboissiere.net>
-Origin: upstream,
- http://hg.savannah.gnu.org/hgweb/octave/rev/f2e72944847b
- http://hg.savannah.gnu.org/hgweb/octave/rev/4663cc835c65
-Forwarded: not-needed
-Last-Update: 2012-09-26
-
---- octave-3.6.3.orig/liboctave/Sparse.cc
-+++ octave-3.6.3/liboctave/Sparse.cc
-@@ -235,7 +235,7 @@ Sparse<T>::Sparse (const dim_vector& dv)
-     (*current_liboctave_error_handler)
-       ("Sparse::Sparse (const dim_vector&): dimension mismatch");
-   else
--    rep = new typename Sparse<T>::SparseRep (dv(0), dv(1));
-+    rep = new typename Sparse<T>::SparseRep (dv(0), dv(1), 0);
- }
- 
- template <class T>
-@@ -301,11 +301,10 @@ Sparse<T>::Sparse (const Array<T>& a, co
-     (*current_liboctave_error_handler)
-       ("sparse: column index %d out of bound %d", r.extent (nc), nc);
- 
--  rep = new SparseRep (nr, nc);
-+  rep = new typename Sparse<T>::SparseRep (nr, nc, (nzm > 0 ? nzm : 0));
- 
-   dimensions = dim_vector (nr, nc);
- 
--
-   octave_idx_type n = a.numel (), rl = r.length (nr), cl = c.length (nc);
-   bool a_scalar = n == 1;
-   if (a_scalar)
-@@ -324,6 +323,7 @@ Sparse<T>::Sparse (const Array<T>& a, co
-       if (n == 1 && a(0) != T ())
-         {
-           change_capacity (nzm > 1 ? nzm : 1);
-+          xcidx(0) = 0;
-           xridx(0) = r(0);
-           xdata(0) = a(0);
-           for (octave_idx_type j = 0; j < nc; j++)
-@@ -352,6 +352,7 @@ Sparse<T>::Sparse (const Array<T>& a, co
-             new_nz += rd[i-1] != rd[i];
-           // Allocate result.
-           change_capacity (nzm > new_nz ? nzm : new_nz);
-+          xcidx (0) = 0;
-           xcidx (1) = new_nz;
-           octave_idx_type *rri = ridx ();
-           T *rrd = data ();
-@@ -494,6 +495,7 @@ Sparse<T>::Sparse (const Array<T>& a, co
-         new_nz += rd[i-1] != rd[i];
-       // Allocate result.
-       change_capacity (nzm > new_nz ? nzm : new_nz);
-+      xcidx(0) = 0;
-       xcidx(1) = new_nz;
-       octave_idx_type *rri = ridx ();
-       T *rrd = data ();
-@@ -1238,16 +1240,31 @@ Sparse<T>::delete_elements (const idx_ve
-         gripe_del_index_out_of_range (false, idx_j.extent (nc), nc);
-       else if (idx_j.is_cont_range (nc, lb, ub))
-         {
--          const Sparse<T> tmp = *this;
--          octave_idx_type lbi = tmp.cidx(lb), ubi = tmp.cidx(ub), new_nz = nz - (ubi - lbi);
--          *this = Sparse<T> (nr, nc - (ub - lb), new_nz);
--          copy_or_memcpy (lbi, tmp.data (), data ());
--          copy_or_memcpy (lbi, tmp.ridx (), ridx ());
--          copy_or_memcpy (nz - ubi, tmp.data () + ubi, xdata () + lbi);
--          copy_or_memcpy (nz - ubi, tmp.ridx () + ubi, xridx () + lbi);
--          copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1);
--          mx_inline_sub (nc - ub, xcidx () + lb + 1,
--                         tmp.cidx () + ub + 1, ubi - lbi);
-+          if (lb == 0 && ub == nc)
-+            {
-+              // Delete all rows and columns.
-+              *this = Sparse<T> (nr, 0);
-+            }
-+          else if (nz == 0)
-+            {
-+              // No elements to preserve; adjust dimensions.
-+              *this = Sparse<T> (nr, nc - (ub - lb));
-+            }
-+          else
-+            {
-+              const Sparse<T> tmp = *this;
-+              octave_idx_type lbi = tmp.cidx(lb), ubi = tmp.cidx(ub),
-+                new_nz = nz - (ubi - lbi);
-+
-+              *this = Sparse<T> (nr, nc - (ub - lb), new_nz);
-+              copy_or_memcpy (lbi, tmp.data (), data ());
-+              copy_or_memcpy (lbi, tmp.ridx (), ridx ());
-+              copy_or_memcpy (nz - ubi, tmp.data () + ubi, xdata () + lbi);
-+              copy_or_memcpy (nz - ubi, tmp.ridx () + ubi, xridx () + lbi);
-+              copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1);
-+              mx_inline_sub (nc - ub, xcidx () + lb + 1,
-+                             tmp.cidx () + ub + 1, ubi - lbi);
-+            }
-         }
-       else
-         *this = index (idx_i, idx_j.complement (nc));
-@@ -1260,24 +1277,40 @@ Sparse<T>::delete_elements (const idx_ve
-         gripe_del_index_out_of_range (false, idx_i.extent (nr), nr);
-       else if (idx_i.is_cont_range (nr, lb, ub))
-         {
--          // This is more memory-efficient than the approach below.
--          const Sparse<T> tmpl = index (idx_vector (0, lb), idx_j);
--          const Sparse<T> tmpu = index (idx_vector (ub, nr), idx_j);
--          *this = Sparse<T> (nr - (ub - lb), nc, tmpl.nnz () + tmpu.nnz ());
--          for (octave_idx_type j = 0, k = 0; j < nc; j++)
-+          if (lb == 0 && ub == nr)
-             {
--              for (octave_idx_type i = tmpl.cidx(j); i < tmpl.cidx(j+1); i++)
--                {
--                  xdata(k) = tmpl.data(i);
--                  xridx(k++) = tmpl.ridx(i);
--                }
--              for (octave_idx_type i = tmpu.cidx(j); i < tmpu.cidx(j+1); i++)
-+              // Delete all rows and columns.
-+              *this = Sparse<T> (0, nc);
-+            }
-+          else if (nz == 0)
-+            {
-+              // No elements to preserve; adjust dimensions.
-+              *this = Sparse<T> (nr - (ub - lb), nc);
-+            }
-+          else
-+            {
-+              // This is more memory-efficient than the approach below.
-+              const Sparse<T> tmpl = index (idx_vector (0, lb), idx_j);
-+              const Sparse<T> tmpu = index (idx_vector (ub, nr), idx_j);
-+              *this = Sparse<T> (nr - (ub - lb), nc,
-+                                 tmpl.nnz () + tmpu.nnz ());
-+              for (octave_idx_type j = 0, k = 0; j < nc; j++)
-                 {
--                  xdata(k) = tmpu.data(i);
--                  xridx(k++) = tmpu.ridx(i) + lb;
--                }
-+                  for (octave_idx_type i = tmpl.cidx(j); i < tmpl.cidx(j+1);
-+                       i++)
-+                    {
-+                      xdata(k) = tmpl.data(i);
-+                      xridx(k++) = tmpl.ridx(i);
-+                    }
-+                  for (octave_idx_type i = tmpu.cidx(j); i < tmpu.cidx(j+1);
-+                       i++)
-+                    {
-+                      xdata(k) = tmpu.data(i);
-+                      xridx(k++) = tmpu.ridx(i) + lb;
-+                    }
- 
--              xcidx(j+1) = k;
-+                  xcidx(j+1) = k;
-+                }
-             }
-         }
-       else
diff --git a/debian/patches/rcond.patch b/debian/patches/rcond.patch
deleted file mode 100644
index 45dcecc..0000000
--- a/debian/patches/rcond.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-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 aa42290..a40c692 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,5 +8,3 @@ correct_typos
 use_system_gl2ps
 drop_version_from_mkoctfile_function_call
 mkoctfile-mpi.diff
-rcond.patch
-fix-sparse-unit-testing.patch

-- 
Debian packaging for octave



More information about the Pkg-octave-commit mailing list