From ce05175372a9ddca1a225db0765ace1127a39293 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 12 Nov 2021 09:22:01 -0800 Subject: chore: simplified organizational structure --- sys/libmath/blas1.c | 58 ----------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 sys/libmath/blas1.c (limited to 'sys/libmath/blas1.c') diff --git a/sys/libmath/blas1.c b/sys/libmath/blas1.c deleted file mode 100644 index a8ca085..0000000 --- a/sys/libmath/blas1.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include - -// ----------------------------------------------------------------------- -// Templates - -#include "loop.h" -#define BODY_XY() \ - LOOP(UNROLL, 0, INIT); \ - n = ROUNDBY(len, UNROLL); \ - if (incx == 1 && incy == 1) { \ - for (i = 0; i < n; i+=UNROLL) { \ - LOOP(UNROLL,0,KERNEL,1,1); \ - } \ - } else { \ - for (i = 0; i < n; i+=UNROLL) { \ - LOOP(UNROLL,0,KERNEL,incx,incy);\ - } \ - } \ - \ - for (; i < len; i++) { \ - LOOP(1,0,KERNEL,incx,incy); \ - } - -#define BODY_X() \ - LOOP(UNROLL, 0, INIT); \ - n = ROUNDBY(len, UNROLL); \ - if (incx == 1) { \ - for (i = 0; i < n; i+=UNROLL) { \ - LOOP(UNROLL,0,KERNEL,1); \ - } \ - } else { \ - for (i = 0; i < n; i+=UNROLL) { \ - LOOP(UNROLL,0,KERNEL,incx); \ - } \ - } \ - \ - for (; i < len; i++) { \ - LOOP(1,0,KERNEL,incx); \ - } - -// ----------------------------------------------------------------------- -// Implementation - -#define UNROLL 8 -#define INT int - -#define FLOAT double -#define func(name) blas·d##name -#include "blas1body" - -#undef FLOAT -#undef func - -#define FLOAT float -#define func(name) blas·f##name -#include "blas1body" -#undef FLOAT -- cgit v1.2.1