aboutsummaryrefslogtreecommitdiff
path: root/matrix/generic/matrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'matrix/generic/matrix.h')
-rw-r--r--matrix/generic/matrix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/matrix/generic/matrix.h b/matrix/generic/matrix.h
index 276ca5c..833724b 100644
--- a/matrix/generic/matrix.h
+++ b/matrix/generic/matrix.h
@@ -8,8 +8,12 @@ typedef struct Matrix {
union {
float *f;
double *d;
+ long *i;
} data; /* pointer to actual storage */
long *data_ref;
} Matrix;
+#define MATRIX_ROW_PTR(self, row) \
+ (MATRIX_ELEM *)((char *)MATRIX_ELEM_PTR(self) + (row) * (self)->stride)
+
#endif