From 13a2131d39b29213f4088b0721f8ae7acc84c187 Mon Sep 17 00:00:00 2001 From: eschnett Date: Thu, 13 Jun 2013 18:52:20 +0000 Subject: Regenerate git-svn-id: http://svn.cactuscode.org/flesh/trunk@5028 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/include/cctk_Loop.h | 82 ++++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/include/cctk_Loop.h b/src/include/cctk_Loop.h index c0935264..ca63c88a 100644 --- a/src/include/cctk_Loop.h +++ b/src/include/cctk_Loop.h @@ -11,6 +11,18 @@ # include # include # include + +# ifndef CCTK_DISABLE_OMP_COLLAPSE +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_1 _Pragma("omp for collapse(1)") +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_2 _Pragma("omp for collapse(2)") +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_3 _Pragma("omp for collapse(3)") +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_4 _Pragma("omp for collapse(4)") +# else +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_1 _Pragma("omp for") +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_2 _Pragma("omp for") +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_3 _Pragma("omp for") +# define CCTK_PRAGMA_OMP_FOR_COLLAPSE_4 _Pragma("omp for") +# endif #endif /* #ifdef CCODE */ @@ -68,7 +80,7 @@ #define CCTK_ENDLOOP1STR_NORMAL(name) \ } \ } \ - typedef cctki0_loop1_normal_##name cctki0_ensure_proper_nesting; \ + typedef cctki0_loop1_normal_##name cctki0_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ @@ -145,7 +157,7 @@ #define CCTK_ENDLOOP1STR_INTERIOR(name) \ } CCTK_ENDLOOP1STR(name##_interior); \ - typedef cctki2_loop1_interior_##name cctki2_ensure_proper_nesting; \ + typedef cctki2_loop1_interior_##name cctki2_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while(0) \ @@ -215,7 +227,7 @@ } CCTK_ENDLOOP1STR_NORMAL(name##_boundaries); \ } /* if bbox */ \ } /* for dir */ \ - typedef cctki2_loop1_boundaries_##name cctki2_ensure_proper_nesting; \ + typedef cctki2_loop1_boundaries_##name cctki2_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ @@ -287,7 +299,7 @@ } CCTK_ENDLOOP1STR_NORMAL(name##_intboundaries); \ } /* if bbox */ \ } /* for dir */ \ - typedef cctki2_loop1_intboundaries_##name cctki2_ensure_proper_nesting; \ + typedef cctki2_loop1_intboundaries_##name cctki2_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ @@ -323,7 +335,7 @@ #define CCTK_ENDLOOP1STR_ALL(name) \ } CCTK_ENDLOOP1STR(name##_all); \ - typedef cctki3_loop1_all_##name cctki3_ensure_proper_nesting; \ + typedef cctki3_loop1_all_##name cctki3_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ @@ -366,7 +378,7 @@ #define CCTK_ENDLOOP1STR_INT(name) \ } CCTK_ENDLOOP1STR_INTERIOR(name##_int); \ - typedef cctki3_loop1_int_##name cctki3_ensure_proper_nesting; \ + typedef cctki3_loop1_int_##name cctki3_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ @@ -415,7 +427,7 @@ #define CCTK_ENDLOOP1STR_BND(name) \ } CCTK_ENDLOOP1STR_BOUNDARIES(name##_bnd); \ - typedef cctki3_loop1_bnd_##name cctki3_ensure_proper_nesting; \ + typedef cctki3_loop1_bnd_##name cctki3_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ @@ -464,7 +476,7 @@ #define CCTK_ENDLOOP1STR_INTBND(name) \ } CCTK_ENDLOOP1STR_INTBOUNDARIES(name##_intbnd); \ - typedef cctki3_loop1_intbnd_##name cctki3_ensure_proper_nesting; \ + typedef cctki3_loop1_intbnd_##name cctki3_ensure_proper_nesting CCTK_ATTRIBUTE_UNUSED; \ } while (0) \ #endif /* #ifdef CCODE */ @@ -1041,7 +1053,7 @@ int const cctki0_istr = (cctki0_istr_); \ int const imin CCTK_ATTRIBUTE_UNUSED = cctki0_imin; \ int const imax CCTK_ATTRIBUTE_UNUSED = cctki0_imax; \ - _Pragma("omp for collapse(1)") \ + CCTK_PRAGMA_OMP_FOR_COLLAPSE_1 \ for (int j=cctki0_jmin; j