From 7897170e09aa19122053ff24797b4d7c23f47cbc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 15 Sep 2024 11:57:21 +0200 Subject: Optimisation for w=8,16,32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index 96df9e7..44a0b5d 100644 --- a/common.h +++ b/common.h @@ -37,6 +37,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] * -- cgit v1.2.3-70-g09d2