chiark / gitweb /
pass weight array to workers (fix semantic conflict between horizontal weight elimina...
[matchsticks-search.git] / main.c
diff --git a/main.c b/main.c
index 3e846280687190398546c5f0729f4a71d99b7bf7..b02e98cbda4beae56f0592e10997bc7ef854ed6e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -113,7 +113,7 @@ static void progress_eol(void) {
 
 static void set_best(double new_best) {
   best = new_best;
-  n_over_best = n / best;
+  n_over_best = floor(n / best);
 }
 
 /*----- multicore support -----*/
@@ -158,7 +158,7 @@ static Worker *mc_us;
 
 static void multicore_check_for_new_best(void);
 
-#define MAX_NIOVS 3
+#define MAX_NIOVS 4
 static AdjWord mc_iter_min;
 static int mc_niovs;
 static size_t mc_iovlen;
@@ -179,6 +179,7 @@ static void mc_rwvsetup_outer(void) {
   IOV(maxhamweight, 1);
   IOV(mc_iter_min, 1);
   IOV(*adjmatrix, multicore_iteration_boundary);
+  IOV(*weight, m);
 }
 
 static void mc_rwvsetup_full(void) {