aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-15 11:57:21 +0200
committerMattias Andrée <maandree@kth.se>2024-09-15 11:57:21 +0200
commit7897170e09aa19122053ff24797b4d7c23f47cbc (patch)
tree7d13e4ed39c46ffe803076603b742bb47479122d /common.h
parentm (diff)
downloadlibkeccak-7897170e09aa19122053ff24797b4d7c23f47cbc.tar.gz
libkeccak-7897170e09aa19122053ff24797b4d7c23f47cbc.tar.bz2
libkeccak-7897170e09aa19122053ff24797b4d7c23f47cbc.tar.xz
Optimisation for w=8,16,32
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/common.h b/common.h
index 96df9e7..44a0b5d 100644
--- a/common.h
+++ b/common.h
@@ -38,6 +38,33 @@
#define COMMA ,
/**
+ * X-macro-enabled listing of all intergers in [0, 0]
+ *
+ * @param X(int) The macro to expand 4 times
+ * @param D Code to insert between each expansion of `X`
+ */
+#define LIST_1(X, D)\
+ X(0)
+
+/**
+ * X-macro-enabled listing of all intergers in [0, 1]
+ *
+ * @param X(int) The macro to expand 2 times
+ * @param D Code to insert between each expansion of `X`
+ */
+#define LIST_2(X, D)\
+ X(0) D X(1)
+
+/**
+ * X-macro-enabled listing of all intergers in [0, 3]
+ *
+ * @param X(int) The macro to expand 4 times
+ * @param D Code to insert between each expansion of `X`
+ */
+#define LIST_4(X, D)\
+ X(0) D X(1) D X(2) D X(3)
+
+/**
* X-macro-enabled listing of all intergers in [0, 4]
*
* @param X(int) The macro to expand 5 times