get rid of empty benchmark
[riscv-tests.git] / benchmarks / mt-matmul / matmul.c
1 // See LICENSE for license details.
2
3 #include "dataset.h"
4 #include "util.h"
5
6 void __attribute__((noinline)) matmul(const int coreid, const int ncores, const int lda, const data_t A[], const data_t B[], data_t C[] )
7 {
8 int i, j, k;
9 int block = lda / ncores;
10 int start = block * coreid;
11
12 for ( j = start; j < (start+block); j++ )
13 {
14 for ( k = 0; k < lda; k++ )
15 {
16 for ( i = 0; i < lda; i++ )
17 {
18 C[i + j*lda] += A[j*lda + k] * B[k*lda + i];
19 }
20 }
21 }
22 }