projects
/
sort-networks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb4fb03
)
sn-count-markov: Flush STDOUT for more immediate output when using tee.
author
Florian Forster
<octo@leeloo.octo.it>
Tue, 1 Feb 2011 06:30:08 +0000
(07:30 +0100)
committer
Florian Forster
<octo@leeloo.octo.it>
Tue, 1 Feb 2011 06:30:08 +0000
(07:30 +0100)
src/sn-count-markov.c
patch
|
blob
|
history
diff --git
a/src/sn-count-markov.c
b/src/sn-count-markov.c
index
2535bd8
..
db010f5
100644
(file)
--- a/
src/sn-count-markov.c
+++ b/
src/sn-count-markov.c
@@
-111,7
+111,10
@@
static int account_network (const sn_network_t *n, uint64_t iteration) /* {{{ */
return (EINVAL);
if (iteration == 0)
return (EINVAL);
if (iteration == 0)
- printf ("# iteration cyclelength\n");
+ {
+ printf ("# prev_iter this_iter cyclelength hashval\n");
+ fflush (stdout);
+ }
key = sn_network_get_hashval (n);
key_ptr = &key;
key = sn_network_get_hashval (n);
key_ptr = &key;
@@
-120,10
+123,15
@@
static int account_network (const sn_network_t *n, uint64_t iteration) /* {{{ */
if (value_ptr != NULL)
{
uint64_t cycle_length = iteration - (*value_ptr);
if (value_ptr != NULL)
{
uint64_t cycle_length = iteration - (*value_ptr);
- printf ("%"PRIu64" %"PRIu64"\n", iteration, cycle_length);
+ printf ("%"PRIu64" %"PRIu64" %"PRIu64" 0x%016"PRIx64"\n",
+ (*value_ptr), iteration, cycle_length, key);
+ fflush (stdout);
cycles_num++;
*value_ptr = iteration;
cycles_num++;
*value_ptr = iteration;
+
+ sn_random_init ();
+
return (0);
}
return (0);
}