aboutsummaryrefslogtreecommitdiff
path: root/matrix/generic/matrix.h
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-31 11:18:16 +0800
committerDeterminant <[email protected]>2015-05-31 11:18:16 +0800
commitab12a9583bdd39884fde9bc2444e6fd1bc5f518e (patch)
tree11d6bf3b4aafd4a07cf78fe8dc921fa5280d8a3e /matrix/generic/matrix.h
parentc6f6ac13a1cf00e440e998422f89b42c69b073a6 (diff)
add async copy by index; add MMatrixInt
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