aboutsummaryrefslogtreecommitdiff
path: root/redist/dclapack.h
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2018-03-17 03:15:46 -0400
committercnlohr <lohr85@gmail.com>2018-03-17 03:15:46 -0400
commitf0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b (patch)
tree3b869cafdea395944a5f9677dcbdafdec9027e5d /redist/dclapack.h
parent08eec7a6bd5edc0fd1cae7f98d7788ea3905a467 (diff)
downloadlibsurvive-f0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b.tar.gz
libsurvive-f0c26bd1b0b8ffe05c0c5f04567a9b7aa47c3e6b.tar.bz2
Update dclapack to do automatic size-of-array'ing
Diffstat (limited to 'redist/dclapack.h')
-rw-r--r--redist/dclapack.h8
1 files changed, 6 insertions, 2 deletions
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