2 #define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))
3 #define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))
4 #define max(x,y) ((x) > (y) ? (x) : (y))
5 #define min(x,y) ((x) < (y) ? (x) : (y))
8 #define IF_TIME(foo) foo;
12 /* matmul.c 128*128 matrix multiply */
14 /* Scattering iterators. */
15 int t2
, t3
, t4
, t5
, t6
, t9
;
21 #pragma omp parallel for private(lbv,ubv,t3,t4,t5,t6,t7,t8,t9)
22 for (t2
=lbp
;t2
<=ubp
;t2
++) {
23 for (t3
=0;t3
<=floord(N
-1,32);t3
++) {
24 for (t4
=32*t2
;t4
<=min(N
-1,32*t2
+31);t4
++) {
26 ubv
=min(N
-1,32*t3
+31);
29 for (t9
=lbv
;t9
<=ubv
;t9
++) {
37 #pragma omp parallel for private(lbv,ubv,t3,t4,t5,t6,t7,t8,t9)
38 for (t2
=lbp
;t2
<=ubp
;t2
++) {
39 for (t3
=0;t3
<=floord(N
-1,32);t3
++) {
40 for (t4
=0;t4
<=floord(N
-1,32);t4
++) {
41 for (t5
=32*t2
;t5
<=min(N
-1,32*t2
+31);t5
++) {
42 for (t6
=32*t4
;t6
<=min(N
-1,32*t4
+31);t6
++) {
44 ubv
=min(N
-1,32*t3
+31);
47 for (t9
=lbv
;t9
<=ubv
;t9
++) {
48 c
[t5
][t9
] = c
[t5
][t9
] + a
[t5
][t6
]*b
[t6
][t9
];