diff options
author | Jasper | 2025-09-02 18:30:22 +0200 |
---|---|---|
committer | Jasper | 2025-09-02 18:30:22 +0200 |
commit | a533f9080d1a4cd645d0129db4d71487c5375086 (patch) | |
tree | 9382b7a274ee55bbae95545c7c8c3447754d5b78 /debug.c | |
parent | abf764dd2d8970150f169b88bd65dadd7baf661f (diff) |
'__VA_ARGS__' in benchmark macro -> '##__VA_ARGS__'
Seems to solve the empty argument problem for macros with variadic
argument lists. GCC only
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -45,7 +45,7 @@ #define BENCHMARK_RAND1(m, n, bound_l, bound_u, func,...) \ do { \ Matrix *A = matrix_rand((m), (n), (bound_l), (bound_u), MATRIX_NONE); \ - func(A, __VA_ARGS__); \ + func(A, ##__VA_ARGS__); \ free(A); \ } while(0) @@ -55,7 +55,6 @@ int main() /* run_tests() */ /* TODO: Add timing. For now the macro executes the given function once */ - /* TODO: Fix for functions that take just the matrix and no additional arguments */ BENCHMARK_RAND1( 100, 100, /* Dimensions: m x n */ 0, 100, /* Value bounds */ |