From 08eec7a6bd5edc0fd1cae7f98d7788ea3905a467 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 17 Mar 2018 03:05:21 -0400 Subject: Now wrangled with ability to use submatricies. --- redist/dclapack.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'redist/dclapack.h') diff --git a/redist/dclapack.h b/redist/dclapack.h index 76ce545..1dc7b77 100644 --- a/redist/dclapack.h +++ b/redist/dclapack.h @@ -10,16 +10,14 @@ #define _ABS(a) ( (a)<=0 ? 0-(a) : (a) ) #ifdef DYNAMIC_INDEX - #define _(A,O,P) A[O*n+P] - #define _I(A,O,P,n) A[O*n+P] + #define _(A,O,P) A[O*A##c+P] #else #define _(A,O,P) A[O][P] - #define _I(A,O,P,n) A[O][P] #endif /* - * Prints a matrix A (n by m) + * Prints a matrix A (n by m) (with witdth Ac) */ #define PRINT(A,n,m) { \ int i,j; \ @@ -34,7 +32,7 @@ } /* - * Returns the identity matrix + * Returns the identity matrix (with size n x n, but width Ic) */ #define IDENTITY(I,n) { \ int i,j; \ @@ -148,11 +146,11 @@ #ifdef DYNAMIC_INDEX #define INV_SETUP(ORDER) \ - FLOAT Ipiv[ORDER*ORDER]; \ - FLOAT L[ORDER*ORDER]; \ - FLOAT U[ORDER*ORDER]; \ - FLOAT I[ORDER*ORDER]; \ - FLOAT C[ORDER*ORDER]; + FLOAT Ipiv[ORDER*ORDER]; const int Ipivc = ORDER; \ + FLOAT L[ORDER*ORDER]; const int Lc = ORDER; \ + FLOAT U[ORDER*ORDER]; const int Uc = ORDER; \ + FLOAT I[ORDER*ORDER]; const int Ic = ORDER; \ + FLOAT C[ORDER*ORDER]; const int Cc = ORDER; #else #define INV_SETUP(ORDER) \ FLOAT Ipiv[ORDER][ORDER]; \ @@ -194,7 +192,7 @@ PRINT(Ainv,n,n); \ for (j=0; j