Bug#897768: hmat-oss: diff for NMU version 1.2.0-2.1

Sudip Mukherjee sudipm.mukherjee at gmail.com
Sat May 2 00:33:39 BST 2020


Control: tags 897768 + patch
Control: tags 897768 + pending

Dear maintainer,

I've prepared an NMU for hmat-oss (versioned as 1.2.0-2.1) and
uploaded it to mentors for sponsoring. Please feel free to tell me if I
should remove it.

--
Regards
Sudip

diff -Nru hmat-oss-1.2.0/debian/changelog hmat-oss-1.2.0/debian/changelog
--- hmat-oss-1.2.0/debian/changelog	2016-10-20 21:08:08.000000000 +0100
+++ hmat-oss-1.2.0/debian/changelog	2020-05-02 00:18:14.000000000 +0100
@@ -1,3 +1,10 @@
+hmat-oss (1.2.0-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS. (Closes: #897768)
+
+ -- Sudip Mukherjee <sudipm.mukherjee at gmail.com>  Sat, 02 May 2020 00:18:14 +0100
+
 hmat-oss (1.2.0-2) unstable; urgency=medium
 
   * New patch: 0002-Fix-compilation-on-Linux-32-bits-systems.patch
diff -Nru hmat-oss-1.2.0/debian/patches/fix_gcc.patch hmat-oss-1.2.0/debian/patches/fix_gcc.patch
--- hmat-oss-1.2.0/debian/patches/fix_gcc.patch	1970-01-01 01:00:00.000000000 +0100
+++ hmat-oss-1.2.0/debian/patches/fix_gcc.patch	2020-05-02 00:18:01.000000000 +0100
@@ -0,0 +1,46 @@
+Description: Fix FTBFS with gcc-8
+ Use std::fill() instead of memset() as done by upstream.
+ Ref: https://github.com/jeromerobert/hmat-oss/commit/9b614cfee6974f4103636402ce3007be336a55b7
+
+Bug-Debian: https://bugs.debian.org/897768
+---
+
+--- hmat-oss-1.2.0.orig/src/full_matrix.cpp
++++ hmat-oss-1.2.0/src/full_matrix.cpp
+@@ -172,10 +172,9 @@ template<typename T> FullMatrix<T>::~Ful
+ 
+ template<typename T> void FullMatrix<T>::clear() {
+   assert(lda == rows);
+-  size_t size = ((size_t) rows) * cols * sizeof(T);
+-  memset(m, 0, size);
++  std::fill(m, m + ((size_t) rows) * cols, Constants<T>::zero);
+   if (diagonal) {
+-    memset(diagonal->v, 0, rows * sizeof(T));
++    std::fill(diagonal->v, diagonal->v + rows, Constants<T>::zero);
+   }
+ }
+ 
+@@ -210,7 +209,7 @@ template<typename T> void FullMatrix<T>:
+     T* x = m;
+     if (alpha == Constants<T>::zero) {
+       for (int col = 0; col < cols; col++) {
+-        memset(x, 0, sizeof(T) * rows);
++        std::fill(x, x + rows, Constants<T>::zero);
+         x += lda;
+       }
+     } else {
+@@ -896,12 +895,12 @@ template<typename T> double Vector<T>::n
+ }
+ 
+ template<typename T> void Vector<T>::clear() {
+-  memset(this->v, 0, sizeof(T) * this->rows);
++  std::fill(this->v, this->v + this->rows, Constants<T>::zero);
+ }
+ 
+ template<typename T> void Vector<T>::scale(T alpha) {
+   if (alpha == Constants<T>::zero) {
+-    memset(v, 0, sizeof(T) * rows);
++    std::fill(v, v + rows, Constants<T>::zero);
+   } else {
+     proxy_cblas::scal(rows, alpha, v, 1);
+   }
diff -Nru hmat-oss-1.2.0/debian/patches/series hmat-oss-1.2.0/debian/patches/series
--- hmat-oss-1.2.0/debian/patches/series	2016-10-20 21:08:08.000000000 +0100
+++ hmat-oss-1.2.0/debian/patches/series	2020-05-01 23:27:04.000000000 +0100
@@ -1,2 +1,3 @@
 0001-make-build-reproducible.patch
 0002-Fix-compilation-on-Linux-32-bits-systems.patch
+fix_gcc.patch



More information about the debian-science-maintainers mailing list