cpp: void kernel_gesummv(int n,\nDATA_TYPE alpha,\nDATA_TYPE beta,\nDATA_TYPE POLYBENCH_2D(A,N,N,n,n),\nDATA_TYPE POLYBENCH_2D(B,N,N,n,n),\nDATA_TYPE POLYBENCH_1D(tmp,N,n),\nDATA_TYPE POLYBENCH_1D(x,N,n),\nDATA_TYPE POLYBENCH_1D(y,N,n))\n{\nint i, j;\n\n#pragma scop\nfor (i = 0; i < _PB_N; i++)\n{\ntmp[i] = 0;\ny[i] = 0;\nfor (j = 0; j < _PB_N; j++)\n{\ntmp[i] = A[i][j] * x[j] + tmp[i];\ny[i] = B[i][j] * x[j] + y[i];\n}\ny[i] = alpha * tmp[i] + beta * y[i];\n}\n#pragma endscop\n\n}
fortran: subroutine kernel_gesummv(n, alpha, beta, &\na, b, tmp, x, y)\nimplicit none\n\nDATA_TYPE, dimension(n, n) :: a\nDATA_TYPE, dimension(n, n) :: b\nDATA_TYPE, dimension(n) :: x, y, tmp\nDATA_TYPE :: alpha, beta\ninteger :: n\ninteger :: i, j\n\n!$pragma scop\ndo i = 1, _PB_N\ntmp(i) = 0.0D0\ny(i) = 0.0D0\ndo j = 1, _PB_N\ntmp(i) = (a(j, i) * x(j)) + tmp(i)\ny(i) = (b(j, i) * x(j)) + y(i)\nend do\ny(i) = (alpha * tmp(i)) + (beta * y(i))\nend do\n!$pragma endscop\nend subroutine