From 1e566223ed11a6b453a0e37cbb664a4192f04e8b Mon Sep 17 00:00:00 2001 From: Werner Saar Date: Wed, 17 Dec 2014 15:02:11 +0100 Subject: [PATCH] added code for the size of n --- benchmark/gemm.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/benchmark/gemm.c b/benchmark/gemm.c index 4f9a588..347cf0d 100644 --- a/benchmark/gemm.c +++ b/benchmark/gemm.c @@ -124,8 +124,9 @@ int MAIN__(int argc, char *argv[]){ FLOAT alpha[] = {1.0, 1.0}; FLOAT beta [] = {1.0, 1.0}; char trans='N'; - blasint m, i, j; + blasint m, n, i, j; int loops = 1; + int has_param_n=0; int l; char *p; @@ -162,6 +163,11 @@ int MAIN__(int argc, char *argv[]){ if ( p != NULL ) loops = atoi(p); + if ((p = getenv("OPENBLAS_PARAM_N"))) { + n = atoi(p); + has_param_n=1; + } + #ifdef linux srandom(getpid()); @@ -174,7 +180,14 @@ int MAIN__(int argc, char *argv[]){ timeg=0; - fprintf(stderr, " %6d : ", (int)m); + if ( has_param_n == 1 && n <= m ) + n=n; + else + n=m; + + + + fprintf(stderr, " %6dx%d : ", (int)m, (int)n); for (l=0; l