diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-01-19 13:24:12 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-01-19 13:24:12 -0500 |
commit | 871a76ffd865ede1d7e21d5a9d3ba9abac1b2aa5 (patch) | |
tree | 33b73124cde2c6380322782545274f68eb8cd722 /Carpet | |
parent | 07f4d7cfc35892e8128a4d5f7db697d875ab730c (diff) |
CarpetLib: Disable DGFE operators if building without DGFE to avoid compiler warnings
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetLib/src/prolongate_3d_dgfe_rf2.cc | 26 | ||||
-rw-r--r-- | Carpet/CarpetLib/src/restrict_3d_dgfe_rf2.cc | 4 |
2 files changed, 8 insertions, 22 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_dgfe_rf2.cc b/Carpet/CarpetLib/src/prolongate_3d_dgfe_rf2.cc index 18d5fcf49..c16d59061 100644 --- a/Carpet/CarpetLib/src/prolongate_3d_dgfe_rf2.cc +++ b/Carpet/CarpetLib/src/prolongate_3d_dgfe_rf2.cc @@ -51,6 +51,7 @@ namespace CarpetLib { ibbox3 const& restrict regbbox, void* const extraargs) { +#ifdef HRSCC_GLL_ELEMENT_HH assert(not extraargs); static_assert(ORDER>=0, "ORDER must be non-negative"); @@ -160,7 +161,6 @@ namespace CarpetLib { int const dststr2d[2] = {dstdj, dstdk}; // Loop over fine region -#ifdef HRSCC_GLL_ELEMENT_HH ptrdiff_t const i=0; #pragma omp parallel for collapse(2) // Zwicky's Intel compiler 11.1 ices on ptrdiff_t @@ -171,10 +171,6 @@ namespace CarpetLib { &dst[DSTIND3(dstioff+2*i, dstjoff+2*j, dstkoff+2*k)], dststr2d); } } -#else - // HRSCCore is not available - assert(0); -#endif } else if (regext[1] == 1) { // 2D prolongation on y face @@ -200,7 +196,6 @@ namespace CarpetLib { int const dststr2d[2]= {dstdi, dstdk}; // Loop over fine region -#ifdef HRSCC_GLL_ELEMENT_HH ptrdiff_t const j=0; #pragma omp parallel for collapse(2) // Zwicky's Intel compiler 11.1 ices on ptrdiff_t @@ -211,10 +206,6 @@ namespace CarpetLib { &dst[DSTIND3(dstioff+2*i, dstjoff+2*j, dstkoff+2*k)], dststr2d); } } -#else - // HRSCCore is not available - assert(0); -#endif } else if (regext[2] == 1) { // 2D prolongation on z face @@ -240,7 +231,6 @@ namespace CarpetLib { int const dststr2d[2]= {dstdi, dstdj}; // Loop over fine region -#ifdef HRSCC_GLL_ELEMENT_HH ptrdiff_t const k=0; #pragma omp parallel for collapse(2) // Zwicky's Intel compiler 11.1 ices on ptrdiff_t @@ -251,10 +241,6 @@ namespace CarpetLib { &dst[DSTIND3(dstioff+2*i, dstjoff+2*j, dstkoff+2*k)], dststr2d); } } -#else - // HRSCCore is not available - assert(0); -#endif } else { // 3D prolongation @@ -278,7 +264,6 @@ namespace CarpetLib { int const dststr[3] = {dstdi, dstdj, dstdk}; // Loop over fine region -#ifdef HRSCC_GLL_ELEMENT_HH #pragma omp parallel for collapse(3) // Zwicky's Intel compiler 11.1 ices on ptrdiff_t for (/*ptrdiff_t*/int k=0; k<regkext; k+=2*(ORDER+1)) { @@ -290,12 +275,13 @@ namespace CarpetLib { } } } -#else - // HRSCCore is not available - assert(0); -#endif } + +#else + // HRSCCore is not available + assert(0); +#endif } diff --git a/Carpet/CarpetLib/src/restrict_3d_dgfe_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_dgfe_rf2.cc index c13b863e8..2ce9b881a 100644 --- a/Carpet/CarpetLib/src/restrict_3d_dgfe_rf2.cc +++ b/Carpet/CarpetLib/src/restrict_3d_dgfe_rf2.cc @@ -51,6 +51,7 @@ namespace CarpetLib { ibbox3 const& restrict regbbox, void *const extraargs) { +#ifdef HRSCC_GLL_ELEMENT_HH assert(not extraargs); static_assert(ORDER>=0, "ORDER must be non-negative"); @@ -145,7 +146,6 @@ namespace CarpetLib { assert(all(regext % (ORDER+1) == 0)); // Loop over coarse region -#ifdef HRSCC_GLL_ELEMENT_HH #pragma omp parallel for collapse(3) // Zwicky's Intel compiler 11.1 ices on ptrdiff_t for (/*ptrdiff_t*/int k=0; k<regkext; k+=ORDER+1) { @@ -157,11 +157,11 @@ namespace CarpetLib { } } } + #else // HRSCCore is not available assert(0); #endif - } |