summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Schubert <erich@debian.org>2016-09-25 15:27:58 +0200
committerAndrej Shadura <andrewsh@debian.org>2019-03-09 22:30:48 +0000
commit01c307bd05626cc38d3c19d6bc9781cd787a6c6c (patch)
treef15703a3084f66cf35b97264df8a0c02135a9e5e
parentdefdc6d2d24cb1cefca77aa63ca6c436a8f3672c (diff)
Import Debian changes 0.7.1-2
elki (0.7.1-2) unstable; urgency=low * Cherry-pick bugfix for single-core systems (Closes: #834739)
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/single-core-bugfix.patch65
3 files changed, 72 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5e9c2b47..0b357042 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+elki (0.7.1-2) unstable; urgency=low
+
+ * Cherry-pick bugfix for single-core systems (Closes: #834739)
+
+ -- Erich Schubert <erich@debian.org> Sun, 25 Sep 2016 15:27:58 +0200
+
elki (0.7.1-1) unstable; urgency=low
* New upstream release (mostly bug fixes)
diff --git a/debian/patches/series b/debian/patches/series
index 33fc6161..8af3738a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
build.patch
better-classpath.patch
+single-core-bugfix.patch
diff --git a/debian/patches/single-core-bugfix.patch b/debian/patches/single-core-bugfix.patch
new file mode 100644
index 00000000..f4a18d0e
--- /dev/null
+++ b/debian/patches/single-core-bugfix.patch
@@ -0,0 +1,65 @@
+From 48e82af606d4c6c133a50405a23a645391f55d80 Mon Sep 17 00:00:00 2001
+From: Erich Schubert <schube@dbs.ifi.lmu.de>
+Date: Thu, 30 Jun 2016 14:38:55 +0200
+Subject: [PATCH] Bug fix for single-core CPUs.
+
+---
+ .../de/lmu/ifi/dbs/elki/parallel/ParallelExecutor.java | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/parallel/ParallelExecutor.java
++++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/parallel/ParallelExecutor.java
+@@ -40,19 +40,19 @@
+
+ /**
+ * Class to run processors in parallel, on all available cores.
+- *
++ *
+ * TODO: add progress
+- *
++ *
+ * @author Erich Schubert
+ * @since 0.7.0
+- *
++ *
+ * @apiviz.has BlockArrayRunner
+ * @apiviz.uses ParallelCore
+ */
+ public class ParallelExecutor {
+ /**
+ * Run a task on all available CPUs.
+- *
++ *
+ * @param ids IDs to process
+ * @param procs Processors to run
+ */
+@@ -65,7 +65,7 @@
+ core.connect();
+ int numparts = core.getParallelism();
+ // TODO: are there better heuristics for choosing this?
+- numparts = (size > numparts * numparts * 16) ? numparts * numparts - 1 : numparts;
++ numparts = (size > numparts * numparts * 16) ? numparts * Math.max(1, numparts - 1) : numparts;
+
+ final int blocksize = (size + (numparts - 1)) / numparts;
+ List<Future<ArrayDBIDs>> parts = new ArrayList<>(numparts);
+@@ -93,9 +93,9 @@
+
+ /**
+ * Run for an array part, without step size.
+- *
++ *
+ * @author Erich Schubert
+- *
++ *
+ * @apiviz.uses Processor
+ */
+ protected static class BlockArrayRunner implements Callable<ArrayDBIDs>, Executor {
+@@ -126,7 +126,7 @@
+
+ /**
+ * Constructor.
+- *
++ *
+ * @param ids IDs to process
+ * @param start Starting position
+ * @param end End position