cpp: void kernel_bicg(int nx, int ny,\nDATA_TYPE POLYBENCH_2D(A,NX,NY,nx,ny),\nDATA_TYPE POLYBENCH_1D(s,NY,ny),\nDATA_TYPE POLYBENCH_1D(q,NX,nx),\nDATA_TYPE POLYBENCH_1D(p,NY,ny),\nDATA_TYPE POLYBENCH_1D(r,NX,nx))\n{\nint i, j;\n\n#pragma scop\nfor (i = 0; i < _PB_NY; i++)\ns[i] = 0;\nfor (i = 0; i < _PB_NX; i++)\n{\nq[i] = 0;\nfor (j = 0; j < _PB_NY; j++)\n{\ns[j] = s[j] + r[i] * A[i][j];\nq[i] = q[i] + A[i][j] * p[j];\n}\n}\n#pragma endscop\n\n}
fortran: subroutine kernel_bicg(nx, ny, a, s, q, p, r)\nimplicit none\n\nDATA_TYPE, dimension(ny, nx) :: a\nDATA_TYPE, dimension(nx) :: r\nDATA_TYPE, dimension(nx) :: q\nDATA_TYPE, dimension(ny) :: p\nDATA_TYPE, dimension(ny) :: s\ninteger :: nx,ny\ninteger :: i,j\n\n!$pragma scop\ndo i = 1, _PB_NY\ns(i) = 0.0D0\nend do\n\ndo i = 1, _PB_NX\nq(i) = 0.0D0\ndo j = 1, _PB_NY\ns(j) = s(j) + (r(i) * a(j, i))\nq(i) = q(i) + (a(j, i) * p(j))\nend do\nend do\n!$pragma endscop\nend subroutine