libgomp/testsuite/libgomp.c-c++-common/matrix-helper.h
raw| 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | |
| 4 | #define CAT(x,y) XCAT(x,y) |
| 5 | #define XCAT(x,y) x ## y |
| 6 | #define DO_PRAGMA(x) XDO_PRAGMA(x) |
| 7 | #define XDO_PRAGMA(x) _Pragma (#x) |
| 8 | |
| 9 | void |
| 10 | print_matrix (float *matrix, unsigned dim0, unsigned dim1) |
| 11 | { |
| 12 | for (unsigned i = 0; i < dim0; i++) |
| 13 | { |
| 14 | for (unsigned j = 0; j < dim1; j++) |
| 15 | fprintf (stderr, "%f ", matrix[i * dim1 + j]); |
| 16 | fprintf (stderr, "\n"); |
| 17 | } |
| 18 | fprintf (stderr, "\n"); |
| 19 | } |