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_stage.h
diff --git
a/src/sn_stage.h
b/src/sn_stage.h
index
0e3f3bd
..
8697eda
100644
(file)
--- a/
src/sn_stage.h
+++ b/
src/sn_stage.h
@@
-29,6
+29,8
@@
#define SN_STAGE_H 1
#include <stdio.h>
#define SN_STAGE_H 1
#include <stdio.h>
+#include <stdint.h>
+#include <inttypes.h>
#include "sn_comparator.h"
#include "sn_comparator.h"
@@
-142,6
+144,7
@@
int sn_stage_comparator_check_conflict (sn_stage_t *s, const sn_comparator_t *c)
* \see sn_network_show
*/
int sn_stage_show (sn_stage_t *s);
* \see sn_network_show
*/
int sn_stage_show (sn_stage_t *s);
+int sn_stage_show_fh (sn_stage_t *s, FILE *fh);
/**
* Inverts a stage by switching the direction of all comparators.
/**
* Inverts a stage by switching the direction of all comparators.
@@
-164,6
+167,8
@@
int sn_stage_invert (sn_stage_t *s);
*/
int sn_stage_shift (sn_stage_t *s, int sw, int inputs_num);
*/
int sn_stage_shift (sn_stage_t *s, int sw, int inputs_num);
+int sn_stage_unify (sn_stage_t *s);
+
/**
* Swaps two lines. This is used by the algorithm used in
* sn_network_normalize() to transform non-standard sort networks to standard
/**
* Swaps two lines. This is used by the algorithm used in
* sn_network_normalize() to transform non-standard sort networks to standard
@@
-250,6
+255,10
@@
int sn_stage_serialize (sn_stage_t *s,
*/
sn_stage_t *sn_stage_unserialize (char **buffer, size_t *buffer_size);
*/
sn_stage_t *sn_stage_unserialize (char **buffer, size_t *buffer_size);
+int sn_stage_compare (const sn_stage_t *s0, const sn_stage_t *s1);
+
+uint64_t sn_stage_get_hashval (const sn_stage_t *s);
+
#endif /* SN_STAGE_H */
/* vim: set shiftwidth=2 softtabstop=2 : */
#endif /* SN_STAGE_H */
/* vim: set shiftwidth=2 softtabstop=2 : */