34 for (i = 0; i < ni; i++)
35 for (j = 0; j < nk; j++)
37 for (i = 0; i < nk; i++)
38 for (j = 0; j < nj; j++)
39 B[i][j] = (
DATA_TYPE) ((i*(j+1)+2) % nj) / (5*nj);
40 for (i = 0; i < nj; i++)
41 for (j = 0; j < nm; j++)
43 for (i = 0; i < nm; i++)
44 for (j = 0; j < nl; j++)
45 D[i][j] = (
DATA_TYPE) ((i*(j+2)+2) % nk) / (5*nk);
59 for (i = 0; i < ni; i++)
60 for (j = 0; j < nl; j++) {
72 void kernel_3mm(
int ni,
int nj,
int nk,
int nl,
int nm,
85 for (i = 0; i <
_PB_NI; i++)
86 for (j = 0; j <
_PB_NJ; j++)
90 E[i][j] +=
A[i][k] *
B[k][j];
93 for (i = 0; i <
_PB_NJ; i++)
94 for (j = 0; j <
_PB_NL; j++)
98 F[i][j] +=
C[i][k] *
D[k][j];
101 for (i = 0; i <
_PB_NI; i++)
102 for (j = 0; j <
_PB_NL; j++)
106 G[i][j] += E[i][k] *
F[k][j];
113 int main(
int argc,
char** argv)
142 kernel_3mm (ni, nj, nk, nl, nm,
#define POLYBENCH_ARRAY(x)
#define POLYBENCH_DUMP_BEGIN(s)
#define POLYBENCH_FREE_ARRAY(x)
#define POLYBENCH_2D(var, dim1, dim2, ddim1, ddim2)
int main(int argc, char **argv)
static const uint32_t k[]
__attribute__((noinline))
Convert the given fixedpt number to a decimal string.
#define POLYBENCH_DUMP_START
#define POLYBENCH_2D_ARRAY_DECL(var, type, dim1, dim2, ddim1, ddim2)
#define DATA_PRINTF_MODIFIER
#define polybench_prevent_dce(func)
static void init_array(int ni, int nj, int nk, int nl, int nm, DATA_TYPE POLYBENCH_2D(A, NI, NK, ni, nk), DATA_TYPE POLYBENCH_2D(B, NK, NJ, nk, nj), DATA_TYPE POLYBENCH_2D(C, NJ, NM, nj, nm), DATA_TYPE POLYBENCH_2D(D, NM, NL, nm, nl))
This version is stamped on May 10, 2016.
#define POLYBENCH_DUMP_TARGET
#define POLYBENCH_DUMP_END(s)
static void print_array(int ni, int nl, DATA_TYPE POLYBENCH_2D(G, NI, NL, ni, nl))
#define POLYBENCH_DUMP_FINISH
#define polybench_stop_instruments
#define polybench_print_instruments
#define polybench_start_instruments