From 5e53685221576ad6ec53bafffd14bc7d5e01fa30 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Mon, 25 May 2020 15:33:54 -0700 Subject: deprecated old python generation files --- sys/libmath/blas.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'sys/libmath/blas.c') diff --git a/sys/libmath/blas.c b/sys/libmath/blas.c index 43b0e70..224480b 100644 --- a/sys/libmath/blas.c +++ b/sys/libmath/blas.c @@ -6,15 +6,15 @@ #include -#define NCOL 2000 -#define NROW 2000 +#define NCOL 20000 +#define NROW 20000 #define NIT 2000 -#define INC 2 +#define INC 1 error main() { int i, j, nit; - double *x, *y, *m, res[2]; + double *x, *y, res[2]; clock_t t; double tprof[2] = { 0 }; @@ -23,17 +23,14 @@ main() x = malloc(sizeof(*x)*NCOL); y = malloc(sizeof(*x)*NROW); - m = malloc(sizeof(*x)*NROW*NCOL); #define DO_0 t = clock(); \ - blas·gerd(NROW/INC, NCOL/INC, 1.2, x, INC, y, INC, m, NCOL); \ - res[0] += m[0]; \ + res[0] += blas·dasum(NROW/INC, x, INC); \ t = clock() - t; \ tprof[0] += 1000.*t/CLOCKS_PER_SEC; \ #define DO_1 t = clock(); \ - cblas_dger(CblasRowMajor, NROW/INC, NCOL/INC, 1.2, x, INC, y, INC, m, NCOL); \ - res[1] += m[0]; \ + res[1] += cblas_dasum(NROW/INC, x, INC); \ t = clock() - t; \ tprof[1] += 1000.*t/CLOCKS_PER_SEC; @@ -41,9 +38,6 @@ main() for (i = 0; i < NROW; i++) { x[i] = rng·random(); y[i] = rng·random(); - for (j = 0; j < NCOL; j++) { - m[j + NCOL*i] = rng·random(); - } } switch (nit % 2) { -- cgit v1.2.1