cpp: void kernel_syrk(int ni, int nj,\nDATA_TYPE alpha,\nDATA_TYPE beta,\nDATA_TYPE POLYBENCH_2D(C,NI,NI,ni,ni),\nDATA_TYPE POLYBENCH_2D(A,NI,NJ,ni,nj))\n{\nint i, j, k;\n\n#pragma scop\n/*  C := alpha*A*A' + beta*C */\nfor (i = 0; i < _PB_NI; i++)\nfor (j = 0; j < _PB_NI; j++)\nC[i][j] *= beta;\nfor (i = 0; i < _PB_NI; i++)\nfor (j = 0; j < _PB_NI; j++)\nfor (k = 0; k < _PB_NJ; k++)\nC[i][j] += alpha * A[i][k] * A[j][k];\n#pragma endscop\n\n}
fortran: subroutine kernel_syrk(ni, nj, alpha, beta, c, a)\nimplicit none\n\nDATA_TYPE, dimension(ni, ni) :: a\nDATA_TYPE, dimension(nj, ni) :: c\nDATA_TYPE :: alpha , beta\ninteger :: nj, ni\ninteger :: i, j, k\n\n!$pragma scop\ndo i = 1, _PB_NI\ndo j = 1, _PB_NI\nc(j, i) = c(j, i) * beta\nend do\nend do\ndo i = 1, _PB_NI\ndo j = 1, _PB_NI\ndo k = 1, _PB_NJ\nc(j, i) = c(j, i) + (alpha * a(k, i) * a(k, j))\nend do\nend do\nend do\n!$pragma endscop\nend subroutine