-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gauss Jordan Matrix Inversion #80
base: main
Are you sure you want to change the base?
Conversation
734e956
to
fb78b4d
Compare
cfddc84
to
71a9849
Compare
[software] Add comment on algorithm
71a9849
to
c04dea3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me. I just have two minor questions.
void Transpose(int32_t *matrix, int32_t *t_matrix, int32_t n, int32_t m) { | ||
int32_t i, j; | ||
for (i = 0; i < n; i++) { | ||
for (j = 0; j < m; j++) { | ||
t_matrix[j * n + i] = matrix[i * m + j]; | ||
} | ||
} | ||
} | ||
|
||
void MatrixMult(int32_t *matrix_1, int32_t *matrix_2, int32_t *matrix_product, | ||
int32_t n, int32_t m, int32_t o) { | ||
int32_t i, j, k; | ||
for (i = 0; i < n; i++) { | ||
for (j = 0; j < o; j++) { | ||
matrix_product[i * o + j] = 0; | ||
for (k = 0; k < m; k++) { | ||
matrix_product[i * o + j] += | ||
FIX_MUL(matrix_1[i * m + k], matrix_2[k * o + j]); | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are unused, right? Do we need them somewhere else?
|
||
#define N 16 | ||
#define M 16 | ||
#define N_BANKS (1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the number of banks in the system? Because for this, we have a globally set define by now.
Added
Add fixed point matrix inversion kernels, following Gauss-Jordan elimination method.
Checklist