Hello community,

here is the log from the commit of package armadillo for openSUSE:Factory 
checked in at 2014-03-18 13:38:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/armadillo (Old)
 and      /work/SRC/openSUSE:Factory/.armadillo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "armadillo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/armadillo/armadillo.changes      2014-03-04 
13:20:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.armadillo.new/armadillo.changes 2014-03-18 
13:38:52.000000000 +0100
@@ -1,0 +2,7 @@
+Sat Mar  8 09:34:02 UTC 2014 - badshah...@gmail.com
+
+- Update to version 4.100.2:
+  + Fix for handling null vectors by normalise()
+  + Fix for memory handling by sparse matrices.
+
+-------------------------------------------------------------------

Old:
----
  armadillo-4.100.0.tar.gz

New:
----
  armadillo-4.100.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ armadillo.spec ++++++
--- /var/tmp/diff_new_pack.VlPUye/_old  2014-03-18 13:38:53.000000000 +0100
+++ /var/tmp/diff_new_pack.VlPUye/_new  2014-03-18 13:38:53.000000000 +0100
@@ -19,7 +19,7 @@
 %define soname libarmadillo4
 
 Name:           armadillo
-Version:        4.100.0
+Version:        4.100.2
 Release:        0
 Summary:        Fast C++ matrix library with interfaces to LAPACK and ATLAS
 License:        MPL-2.0

++++++ armadillo-4.100.0.tar.gz -> armadillo-4.100.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.100.0/CMakeLists.txt 
new/armadillo-4.100.2/CMakeLists.txt
--- old/armadillo-4.100.0/CMakeLists.txt        2014-02-28 06:25:49.000000000 
+0100
+++ new/armadillo-4.100.2/CMakeLists.txt        2014-03-07 06:35:34.000000000 
+0100
@@ -14,7 +14,7 @@
 
 set(ARMA_MAJOR 4)
 set(ARMA_MINOR 100)
-set(ARMA_PATCH 0)
+set(ARMA_PATCH 2)
 
 message(STATUS "Configuring Armadillo 
${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH}")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.100.0/include/armadillo_bits/arma_version.hpp 
new/armadillo-4.100.2/include/armadillo_bits/arma_version.hpp
--- old/armadillo-4.100.0/include/armadillo_bits/arma_version.hpp       
2014-02-28 06:25:49.000000000 +0100
+++ new/armadillo-4.100.2/include/armadillo_bits/arma_version.hpp       
2014-03-07 06:35:34.000000000 +0100
@@ -13,7 +13,7 @@
 
 #define ARMA_VERSION_MAJOR 4
 #define ARMA_VERSION_MINOR 100
-#define ARMA_VERSION_PATCH 0
+#define ARMA_VERSION_PATCH 2
 #define ARMA_VERSION_NAME  "Dirt Cruiser"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/armadillo-4.100.0/include/armadillo_bits/memory.hpp 
new/armadillo-4.100.2/include/armadillo_bits/memory.hpp
--- old/armadillo-4.100.0/include/armadillo_bits/memory.hpp     2014-02-06 
17:13:46.000000000 +0100
+++ new/armadillo-4.100.2/include/armadillo_bits/memory.hpp     2014-03-07 
03:43:54.000000000 +0100
@@ -37,7 +37,7 @@
   const uword chunksize = arma_config::spmat_chunksize;
   
   // this relies on integer division
-  const uword n_elem_mod = (n_elem > 0) ? (((n_elem-1) / chunksize) + 1) * 
chunksize : chunksize;
+  const uword n_elem_mod = (n_elem > 0) ? (((n_elem-1) / chunksize) + 1) * 
chunksize : uword(0);
   
   return n_elem_mod;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.100.0/include/armadillo_bits/op_normalise_meat.hpp 
new/armadillo-4.100.2/include/armadillo_bits/op_normalise_meat.hpp
--- old/armadillo-4.100.0/include/armadillo_bits/op_normalise_meat.hpp  
2014-02-25 07:10:58.000000000 +0100
+++ new/armadillo-4.100.2/include/armadillo_bits/op_normalise_meat.hpp  
2014-03-03 04:42:31.000000000 +0100
@@ -19,13 +19,18 @@
   {
   arma_extra_debug_sigprint();
   
+  typedef typename T1::pod_type T;
+  
   const uword p = in.aux_uword_a;
   
   arma_debug_check( (p == 0), "normalise(): p must be greater than zero" );
   
   const quasi_unwrap<T1> tmp(in.m);
   
-  out = tmp.M / norm(tmp.M, p);
+  const T norm_val_a = norm(tmp.M, p);
+  const T norm_val_b = (norm_val_a != T(0)) ? norm_val_a : T(1);
+  
+  out = tmp.M / norm_val_b;
   }
 
 
@@ -37,13 +42,18 @@
   {
   arma_extra_debug_sigprint();
   
+  typedef typename T1::pod_type T;
+  
   const uword p = in.aux_uword_a;
   
   arma_debug_check( (p == 0), "normalise(): p must be greater than zero" );
   
   const unwrap<T1> tmp(in.m);
   
-  out = tmp.M / norm(tmp.M, p);
+  const T norm_val_a = norm(tmp.M, p);
+  const T norm_val_b = (norm_val_a != T(0)) ? norm_val_a : T(1);
+  
+  out = tmp.M / norm_val_b;
   }
 
 
@@ -91,6 +101,8 @@
   {
   arma_extra_debug_sigprint();
   
+  typedef typename get_pod_type<eT>::result T;
+  
   out.copy_size(A);
   
   if(A.n_elem == 0)  { return; }
@@ -101,7 +113,10 @@
     
     for(uword i=0; i<n_cols; ++i)
       {
-      out.col(i) = A.col(i) / norm(A.col(i), p);
+      const T norm_val_a = norm(A.col(i), p);
+      const T norm_val_b = (norm_val_a != T(0)) ? norm_val_a : T(1);
+      
+      out.col(i) = A.col(i) / norm_val_b;
       }
     }
   else
@@ -112,7 +127,10 @@
     
     for(uword i=0; i<n_rows; ++i)
       {
-      out.row(i) = A.row(i) / norm(A.row(i), p);
+      const T norm_val_a = norm(A.row(i), p);
+      const T norm_val_b = (norm_val_a != T(0)) ? norm_val_a : T(1);
+      
+      out.row(i) = A.row(i) / norm_val_b;
       }
     }
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/armadillo-4.100.0/include/armadillo_bits/operator_minus.hpp 
new/armadillo-4.100.2/include/armadillo_bits/operator_minus.hpp
--- old/armadillo-4.100.0/include/armadillo_bits/operator_minus.hpp     
2013-08-05 05:00:24.000000000 +0200
+++ new/armadillo-4.100.2/include/armadillo_bits/operator_minus.hpp     
2014-03-07 06:34:44.000000000 +0100
@@ -172,6 +172,27 @@
 
 
 
+//! unary "-" for sparse objects 
+template<typename T1>
+inline
+typename
+enable_if2
+  <
+  is_arma_sparse_type<T1>::value && is_signed<typename T1::elem_type>::value,
+  SpOp<T1,spop_scalar_times>
+  >::result
+operator-
+(const T1& X)
+  {
+  arma_extra_debug_sigprint();
+  
+  typedef typename T1::elem_type eT;
+  
+  return SpOp<T1,spop_scalar_times>(X, eT(-1));
+  }
+
+
+
 //! subtraction of two sparse objects
 template<typename T1, typename T2>
 inline

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to