From 43ecfce7d20360a5fdc53e5ced266eccc8723242 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 29 May 2020 14:41:05 -0700 Subject: blas code update --- include/libmath.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'include/libmath.h') diff --git a/include/libmath.h b/include/libmath.h index 40ae4ee..c605d24 100644 --- a/include/libmath.h +++ b/include/libmath.h @@ -134,17 +134,26 @@ float math·truncf(float); typedef struct math·Vector { - double *data; + double *d; int len; + int inc; } math·Vector; -#define math·slicev(vec, lo, hi) (struct math·Vector){.len=((hi)-(lo)), .data=((vec).data + (lo))} +#define iota(x) 1 << (x) +enum +{ + mat·trans = iota(1), + mat·symm = iota(2), + mat·posdef = iota(3), + mat·negdef = iota(4), +}; typedef struct math·Matrix { - double *data; - uint32 kind; + double *d; + uint state; int dim[2]; + int inc; } math·Matrix; // TODO: tensor ala numpy -- cgit v1.2.1