Skip to content

Commit

Permalink
feat: support 6 arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz committed Aug 19, 2023
1 parent 3ab80cb commit 629600e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
File renamed without changes.
14 changes: 14 additions & 0 deletions tests/mat_mul.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
void mat_mul(float *a, float *b, float *res, long d1, long d2, long d3)
{
// add the remaining vectors
for (int i = 0; i < d1; i++)
{
for (int j = 0; j < d3; j++) {
float sum = 0;
for (int k = 0; k < d2; k++) {
sum += a[i * d2 + k] * b[k * d3 + j];
}
res[i * d3 + j] = sum;
}
}
}

0 comments on commit 629600e

Please sign in to comment.