* GNU General Public License for more details.
*/
+#define _GNU_SOURCE
+
+#include <publib.h>
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/uio.h>
#include <sys/fcntl.h>
-#include <publib.h>
#include <glpk.h>
/*
static void iterate(void);
static void iterate_recurse(int i, AdjWord min);
+static bool preconsider_ok(int nwords, bool doprint);
+static bool maxhamweight_ok(void);
static void optimise(bool doprint);
static void progress_eol(void) {
} Worker;
static Worker *mc_us;
+static void multicore_check_for_new_best(void);
+
#define MAX_NIOVS 3
static AdjWord mc_iter_min;
static int mc_niovs;
static int totalfrags;
+static bool maxhamweight_ok(void) {
+ double maxminsize = (double)m / maxhamweight;
+ return maxminsize > best;
+}
+
static bool preconsider_ok(int nwords, bool doprint) {
int i;
static void iterate(void) {
for (maxhamweight=1; maxhamweight<=m; maxhamweight++) {
- double maxminsize = (double)m / maxhamweight;
- if (maxminsize <= best)
+ if (!maxhamweight_ok())
continue;
iterate_recurse(0, 1);