From f0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 17 Mar 2018 03:15:46 -0400 Subject: Update dclapack to do automatic size-of-array'ing --- redist/dclapack.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'redist/dclapack.h') diff --git a/redist/dclapack.h b/redist/dclapack.h index 1dc7b77..af8869c 100644 --- a/redist/dclapack.h +++ b/redist/dclapack.h @@ -9,10 +9,14 @@ #define _ABS(a) ( (a)<=0 ? 0-(a) : (a) ) +//Tricky: If you want to use this with pointers, instead of 2D arrays, you will +//need to #define DYNAMIC_INDEX, as well as, for all arrays, suffix their name +//with 'c' + #ifdef DYNAMIC_INDEX - #define _(A,O,P) A[O*A##c+P] + #define _(AM,O,P) AM[O*AM##c+P] #else - #define _(A,O,P) A[O][P] + #define _(AM,O,P) AM[O][P] #endif -- cgit v1.2.3