[liblbfgs] 01/03: patch import

Dima Kogan dima at secretsauce.net
Sat Jan 18 21:44:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch debian
in repository liblbfgs.

commit b1cba0518a99bf249408c93f457c80b7edf75f1f
Author: Dima Kogan <dima at secretsauce.net>
Date:   Sat Jan 18 12:19:19 2014 -0800

    patch import
---
 ...ee-for-memory-allocated-by-posix_memalign.patch | 35 ++++++++++++++++++++++
 ...-describing-the-default-max_linesearch-va.patch | 24 +++++++++++++++
 debian/patches/series                              |  2 ++
 3 files changed, 61 insertions(+)

diff --git a/debian/patches/0002-use-free-for-memory-allocated-by-posix_memalign.patch b/debian/patches/0002-use-free-for-memory-allocated-by-posix_memalign.patch
new file mode 100644
index 0000000..e01d2a3
--- /dev/null
+++ b/debian/patches/0002-use-free-for-memory-allocated-by-posix_memalign.patch
@@ -0,0 +1,35 @@
+From: Koichi Akabe <vbkaisetsu at gmail.com>
+Date: Sat, 18 Jan 2014 12:16:41 -0800
+Subject: use free() for memory allocated by posix_memalign
+Forwarded: This was already upstream: https://github.com/chokkan/liblbfgs/commit/d83800b05cd876dbfbe09cc113ab84cb6726ed8d
+
+The SSE code was making sure to use the system-dependent flavors of mallc() but
+was not doing so for the corresponding free()
+
+_aligned_free is used in arithmetic_sse_float.h, but other headers use free() in
+same position. memblock will be allocated by posix_memalign in Linux, so please
+use free() instead of _aligned_free.
+
+Patch provided at
+
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735894
+---
+ lib/arithmetic_sse_float.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/arithmetic_sse_float.h b/lib/arithmetic_sse_float.h
+index 835b8aa..f5691b1 100644
+--- a/lib/arithmetic_sse_float.h
++++ b/lib/arithmetic_sse_float.h
+@@ -65,7 +65,11 @@ inline static void* vecalloc(size_t size)
+ 
+ inline static void vecfree(void *memblock)
+ {
++#ifdef	_MSC_VER
+     _aligned_free(memblock);
++#else
++    free(memblock);
++#endif
+ }
+ 
+ #define vecset(x, c, n) \
diff --git a/debian/patches/0003-The-comment-describing-the-default-max_linesearch-va.patch b/debian/patches/0003-The-comment-describing-the-default-max_linesearch-va.patch
new file mode 100644
index 0000000..b40476b
--- /dev/null
+++ b/debian/patches/0003-The-comment-describing-the-default-max_linesearch-va.patch
@@ -0,0 +1,24 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sat, 18 Jan 2014 12:36:07 -0800
+Subject: The comment describing the default max_linesearch value now matches
+ the code
+Forwarded: https://github.com/chokkan/liblbfgs/pull/9
+
+The code set it to 40, but the comment said 20. The comment now matches the code
+---
+ include/lbfgs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/lbfgs.h b/include/lbfgs.h
+index cd944a3..5a1f9be 100644
+--- a/include/lbfgs.h
++++ b/include/lbfgs.h
+@@ -257,7 +257,7 @@ typedef struct {
+     /**
+      * The maximum number of trials for the line search.
+      *  This parameter controls the number of function and gradients evaluations
+-     *  per iteration for the line search routine. The default value is \c 20.
++     *  per iteration for the line search routine. The default value is \c 40.
+      */
+     int             max_linesearch;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index b54f4ee..63aa741 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 0001-tweaked-libtool-package-versioning-to-conform-with-d.patch
+0002-use-free-for-memory-allocated-by-posix_memalign.patch
+0003-The-comment-describing-the-default-max_linesearch-va.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liblbfgs.git



More information about the debian-science-commits mailing list