cpp: void kernel_trmm(int ni,\nDATA_TYPE alpha,\nDATA_TYPE POLYBENCH_2D(A,NI,NI,ni,ni),\nDATA_TYPE POLYBENCH_2D(B,NI,NI,ni,ni))\n{\nint i, j, k;\n\n#pragma scop\n/*  B := alpha*A'*B, A triangular */\nfor (i = 1; i < _PB_NI; i++)\nfor (j = 0; j < _PB_NI; j++)\nfor (k = 0; k < i; k++)\nB[i][j] += alpha * A[i][k] * B[j][k];\n#pragma endscop\n\n}
fortran: subroutine kernel_trmm(ni, alpha, a, b)\nimplicit none\n\nDATA_TYPE, dimension(ni, ni) :: a\nDATA_TYPE, dimension(ni, ni) :: b\nDATA_TYPE :: alpha\ninteger :: ni\ninteger :: i, j, k\n\n!$pragma scop\ndo i = 2, _PB_NI\ndo j = 1, _PB_NI\ndo k = 1, i - 1\nb(j, i) = b(j, i) + (alpha * a(k, i) * b(k, j))\nend do\nend do\nend do\n!$pragma endscop\nend subroutine