src/sn_stage.[ch]: Implement `sn_stage_shift'.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 20 Nov 2008 08:43:29 +0000 (09:43 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 20 Nov 2008 08:43:29 +0000 (09:43 +0100)
src/sn_stage.c
src/sn_stage.h

index 3999851..5799b7c 100644 (file)
@@ -282,6 +282,16 @@ int sn_stage_invert (sn_stage_t *s)
   return (0);
 } /* int sn_stage_invert */
 
+int sn_stage_shift (sn_stage_t *s, int sw, int inputs_num)
+{
+  int i;
+
+  for (i = 0; i < s->comparators_num; i++)
+    sn_comparator_shift (s->comparators + i, sw, inputs_num);
+
+  return (0);
+} /* int sn_stage_shift */
+
 int sn_stage_swap (sn_stage_t *s, int con0, int con1)
 {
   int i;
index e625de6..295e296 100644 (file)
@@ -56,6 +56,7 @@ int sn_stage_comparator_check_conflict (sn_stage_t *s, const sn_comparator_t *c)
 
 int sn_stage_show (sn_stage_t *s);
 int sn_stage_invert (sn_stage_t *s);
+int sn_stage_shift (sn_stage_t *s, int sw, int inputs_num);
 int sn_stage_swap (sn_stage_t *s, int con0, int con1);
 int sn_stage_cut_at (sn_stage_t *s, int input, enum sn_network_cut_dir_e dir);
 int sn_stage_remove_input (sn_stage_t *s, int input);