The unified diff between revisions [65df00aa..] and [4f22e7ef..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'matrix.h'
# # old_revision [65df00aa2705ce33fd74f4dd706d2879fe99b2b0] # new_revision [4f22e7ef7d3064e3b51a5b868a4722f3f13c747b] # # add_file "matrix.h" # content [8a673aeabd2806fd044f0d9d14418d4c2d39ffac] # ============================================================ --- /dev/null +++ matrix.h 8a673aeabd2806fd044f0d9d14418d4c2d39ffac @@ -0,0 +1,19 @@ +/* matrix.h */ + +/* dest[r][c] = m1[r][n] * m2[n][c] */ +void matrix_multiply(float *dest, float *m1, float *m2, int r, int c, int n); + +/* dest[r][c] = m1[r][n] * m2[c][n] */ +void matrix_multiply_t(float *dest, float *m1, float *m2, int r, int c, int n); + +/* dest[r][c] = m1[r][c] + m2[r][c] */ +void matrix_add(float *dest, float *m1, float *m2, int r, int c); + +#ifdef MATRIX_DEBUG +void dump_matrix(float *m, int r, int c); +#endif + +/* Invert src into dst. + * NOTE: destroys the src matrix + */ +void matrix_invert(float *dst, float *src, int size);