PandA-2024.02
module.c
Go to the documentation of this file.
1 #include "module.h"
2 // matrix multiplication of a A*B matrix
3 //void mm (int in_a[A_ROWS][A_COLS], int in_b[A_COLS][B_COLS], int out_c[A_ROWS][B_COLS])
4 void
5 __attribute__ ((noinline))
6 mm(int(* __restrict__ in_a)[A_COLS], int(* __restrict__ in_b)[B_COLS], int(* __restrict__ out_c)[B_COLS])
7 {
8  int i,j,k;
9  for (i = 0; i < A_ROWS; i++)
10  {
11  for (j = 0; j < B_COLS; j++)
12  {
13  int sum_mult = 0;
14  for (k = 0; k < A_COLS; k++)
15  {
16  sum_mult += in_a[i][k] * in_b[k][j];
17  }
18  out_c[i][j] = sum_mult;
19  }
20  }
21 }
#define A_COLS
Definition: module.c:2
void mm(int in_a[A_ROWS][A_COLS], int in_b[A_COLS][B_COLS], int out_c[A_ROWS][B_COLS])
Definition: module.c:6
static const uint32_t k[]
Definition: sha-256.c:22
#define A_ROWS
Definition: module.c:1
#define B_COLS
Definition: module.c:4
node_tree * __attribute__((noinline))
Definition: module.c:256

Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by doxygen 1.8.13