cpp: void kernel_floyd_warshall(int n,\nDATA_TYPE POLYBENCH_2D(path,N,N,n,n))\n{\nint i, j, k;\n\n#pragma scop\nfor (k = 0; k < _PB_N; k++)\n{\nfor(i = 0; i < _PB_N; i++)\nfor (j = 0; j < _PB_N; j++)\npath[i][j] = path[i][j] < path[i][k] + path[k][j] ?\npath[i][j] : path[i][k] + path[k][j];\n}\n#pragma endscop\n\n}
fortran: subroutine kernel_floyd_warshall(n, path)\nimplicit none\n\nDATA_TYPE, dimension(n,n) :: path\ninteger :: n\ninteger :: i, j, k\n\n!$pragma scop\ndo k=1, _PB_N\ndo i=1, _PB_N\ndo j=1, _PB_N\nif( path(j, i) .GE. path(k, i) + path(j, k) ) then\npath(j, i) = path(k, i) + path(j, k)\nend if\nend do\nend do\nend do\n!$pragma endscop\nend subroutine