projects
/
sort-networks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/sn_{network,stage}.[ch]: Implement sn_{network,stage}_show_fh.
[sort-networks.git]
/
src
/
sn_population.c
diff --git
a/src/sn_population.c
b/src/sn_population.c
index
1bfea20
..
53393d7
100644
(file)
--- a/
src/sn_population.c
+++ b/
src/sn_population.c
@@
-1,6
+1,6
@@
/**
/**
- *
collectd
- src/sn_population.c
- * Copyright (C) 2008 Florian octo Forster
+ *
libsortnetwork
- src/sn_population.c
+ * Copyright (C) 2008
-2010
Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@
-16,7
+16,7
@@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
- * Florian octo Forster <
octo at verplant.org
>
+ * Florian octo Forster <
ff at octo.it
>
**/
#ifndef _ISOC99_SOURCE
**/
#ifndef _ISOC99_SOURCE
@@
-71,7
+71,7
@@
static int brute_force_minimize (sn_network_t *n_orig)
int stage_index;
int comparator_index;
int stage_index;
int comparator_index;
- printf ("brute_force_minimize: Running full fledged brute force optimization.\n");
+ /* printf ("brute_force_minimize: Running full fledged brute force optimization.\n"); */
for (stage_index = 0;
stage_index < SN_NETWORK_STAGE_NUM (n_orig);
for (stage_index = 0;
stage_index < SN_NETWORK_STAGE_NUM (n_orig);
@@
-99,9
+99,11
@@
static int brute_force_minimize (sn_network_t *n_orig)
status = sn_network_brute_force_check (n_copy);
if (status == 0)
{
status = sn_network_brute_force_check (n_copy);
if (status == 0)
{
+ /*
printf ("brute_force_minimize: Removed a comparator "
"(stage %i, comparator %i).\n",
stage_index, comparator_index);
printf ("brute_force_minimize: Removed a comparator "
"(stage %i, comparator %i).\n",
stage_index, comparator_index);
+ */
sn_stage_comparator_remove (s_orig, comparator_index);
comparator_index--;
sn_stage_comparator_remove (s_orig, comparator_index);
comparator_index--;
@@
-193,7
+195,7
@@
int sn_population_push (sn_population_t *p, sn_network_t *n)
pthread_mutex_lock (&p->lock);
pthread_mutex_lock (&p->lock);
- if (p->best_rating >=
rating
)
+ if (p->best_rating >=
(rating - 4)
)
{
pthread_mutex_unlock (&p->lock);
{
pthread_mutex_unlock (&p->lock);