namespace enco
{
-// TODO Add a comment
+/**
+ * @brief Add a bypass Shuffle if two continued Shuffles map same from-into
+ *
+ * %bag_1 = Bag(size: N)
+ * %bag_2 = Bag(size: N)
+ * %bag_3 = Bag(size: N)
+ *
+ * >>> BEFORE <<<
+ * Shuffle(from: %bag_1, into: %bag_2, [0 -> 0])
+ * Shuffle(from: %bag_2, into: %bag_3, [0 -> 0])
+ *
+ * Let's refer to the former shuffle as Shuffle 1 and the latter one as Shuffle 2.
+ * We can replace Shuffle 2 with new Shuffle 3 as follows when Shuffle 1 and
+ * Shuffle 2 map to the same position.
+ *
+ * >>> AFTER <<<
+ * Shuffle(from: %bag_1, into: %bag_2, [0 -> 0]) <- Shuffle 1
+ * Shuffle(from: %bag_1, into: %bag_3, [0 -> 0]) <- Shuffle 3
+ *
+ * Note that Shuffle 1 can be eliminated when %bag_2 is not used
+ */
void generate_bypass_shuffle(enco::Code *code);
/**