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
[] )
9 // ***************************** //
10 // **** ADD YOUR CODE HERE ***** //
11 int i
, j
, k
, limit
, end
, kblock
, iblock
, r
, jblock
;
17 end
= (coreid
+1)*limit
;
22 for (; j
< end
; j
+= jblock
)
23 for ( k
= 0; k
< lda
; k
= k
+ kblock
)
28 for ( i
= 0; i
< lda
; i
= i
+ iblock
) {
31 C
[i
+ j
*lda
] += tempA1
*B
[tempB1
];
36 // ***************************** //
38 // feel free to make a separate function for MI and MSI versions.