source:
CIVL/examples/matmat.cvl@
73f1e27
| Last change on this file since 73f1e27 was 364cc7e, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 305 bytes | |
| Line | |
|---|---|
| 1 | int L = 4; |
| 2 | int M = 5; |
| 3 | int N = 6; |
| 4 | \input double A[L][M]; |
| 5 | \input double B[M][N]; |
| 6 | double C[L][N]; |
| 7 | |
| 8 | void spec() { |
| 9 | for (int i = 0; i < L; i++) |
| 10 | for (int j = 0; j < N; j++) { |
| 11 | C[i][j] = 0.0; |
| 12 | for (int k = 0; k < M; k++) |
| 13 | C[i][j] += A[i][k] * B[k][j]; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | void main() { |
| 18 | spec(); |
| 19 | |
| 20 | } |
Note:
See TracBrowser
for help on using the repository browser.
