diff options
author | eschnett <eschnett@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2014-04-23 09:45:34 +0000 |
---|---|---|
committer | eschnett <eschnett@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2014-04-23 09:45:34 +0000 |
commit | b0eee8a341401ab208b49c262f70f73953d46778 (patch) | |
tree | a4fd6dfaafb44378409bd868603d0fe496485466 | |
parent | af957095c748c2f23cb00d7ed3f6998db3a35aa4 (diff) |
Make code compile with IBM C++ compiler
IBM's C++ compiler is apparently more picky than GCC or Intel:
Do not pass cctkGH as reference (except when passing to Fortran).
cctkGH is a pointer; passing it as reference has no benefit.
Change some "& restrict" to "&". The meaning of "restrict" in C++ is
not standardized, and apparently IBM's C++ compiler does not like this
usage.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@646 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
-rw-r--r-- | src/GRHydro_PPMReconstruct_drv_opt.cc | 2 | ||||
-rw-r--r-- | src/GRHydro_Reconstruct.cc | 6 | ||||
-rw-r--r-- | src/GRHydro_Reconstruct_drv_cxx.hh | 26 | ||||
-rw-r--r-- | src/GRHydro_Reconstruct_drv_impl.hh | 2 | ||||
-rw-r--r-- | src/make.code.defn | 2 |
5 files changed, 19 insertions, 19 deletions
diff --git a/src/GRHydro_PPMReconstruct_drv_opt.cc b/src/GRHydro_PPMReconstruct_drv_opt.cc index 6cf2e3e..f53411b 100644 --- a/src/GRHydro_PPMReconstruct_drv_opt.cc +++ b/src/GRHydro_PPMReconstruct_drv_opt.cc @@ -46,7 +46,7 @@ static inline void oned_unslice(const int npt, const int nstart, const int nstri */ extern "C" -void CCTK_FNAME(GRHydro_PPMReconstruct_drv_opt)(cGH const * const restrict & restrict cctkGH) +void CCTK_FNAME(GRHydro_PPMReconstruct_drv_opt)(cGH const * const restrict & /*restrict*/ cctkGH) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; diff --git a/src/GRHydro_Reconstruct.cc b/src/GRHydro_Reconstruct.cc index 1a3eb4b..7a70642 100644 --- a/src/GRHydro_Reconstruct.cc +++ b/src/GRHydro_Reconstruct.cc @@ -41,10 +41,10 @@ CCTK_INT GRHydro_UseGeneralCoordinates(const cGH * cctkGH); This is needed right now because we want to also call this from Fotran */ extern "C" -void CCTK_FCALL CCTK_FNAME(GRHydro_PPMReconstruct_drv_opt)(cGH const * const restrict & restrict cctkGH); +void CCTK_FCALL CCTK_FNAME(GRHydro_PPMReconstruct_drv_opt)(cGH /*const*/ * const restrict & /*restrict*/ cctkGH); extern "C" -void CCTK_FCALL CCTK_FNAME(primitive2conservativeM)(cGH const * const restrict & restrict cctkGH); +void CCTK_FCALL CCTK_FNAME(primitive2conservativeM)(cGH /*const*/ * const restrict & /*restrict*/ cctkGH); /** @@ -58,7 +58,7 @@ struct reconstruct const bool do_temp, const bool reconstruct_Wv, const bool clean_divergence, - cGH const * const restrict & restrict cctkGH) + cGH const * const restrict cctkGH) { if (!do_mhd && !do_Ye && !do_temp && reconstruct_Wv) GRHydro_Reconstruct_drv_cxx <false, false, false, true, false, RECONSTRUCT > (cctkGH); diff --git a/src/GRHydro_Reconstruct_drv_cxx.hh b/src/GRHydro_Reconstruct_drv_cxx.hh index 57fb0bf..4375cd7 100644 --- a/src/GRHydro_Reconstruct_drv_cxx.hh +++ b/src/GRHydro_Reconstruct_drv_cxx.hh @@ -19,46 +19,46 @@ template <bool do_mhd, bool do_reconstruct_Wv, bool do_clean_divergence, class RECONSTRUCT> // the reconstruction operator -void GRHydro_Reconstruct_drv_cxx(cGH const * const restrict & restrict cctkGH); +void GRHydro_Reconstruct_drv_cxx(cGH const * const restrict cctkGH); // helper macro to instantiate all required permuations of the template options // this must match GRHydro_Reconstruct's reconstruct::select routine #define INSTANTIATE_RECONSTRUCTION_OPERATOR(RECONSTRUCT) \ template void \ GRHydro_Reconstruct_drv_cxx <false, false, false, true, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, false, false, true, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, true, true, true, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, false, false, true, true, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, true, true, true, true, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <false, true, true, true, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <false, false, false, false, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, false, false, false, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, true, true, false, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, false, false, false, true, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <true, true, true, false, true, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); \ + cGH const * const restrict cctkGH); \ template void \ GRHydro_Reconstruct_drv_cxx <false, true, true, false, false, RECONSTRUCT> ( \ - cGH const * const restrict & restrict cctkGH); + cGH const * const restrict cctkGH); #endif // _GRHYDRO_RECONSTRUCT_DRV_CXX_H diff --git a/src/GRHydro_Reconstruct_drv_impl.hh b/src/GRHydro_Reconstruct_drv_impl.hh index 07402db..542a042 100644 --- a/src/GRHydro_Reconstruct_drv_impl.hh +++ b/src/GRHydro_Reconstruct_drv_impl.hh @@ -120,7 +120,7 @@ template <bool do_mhd, bool do_reconstruct_Wv, bool do_clean_divergence, class RECONSTRUCT> // the reconstruction operator -void GRHydro_Reconstruct_drv_cxx(cGH const * const restrict & restrict cctkGH) +void GRHydro_Reconstruct_drv_cxx(cGH const * const restrict cctkGH) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; diff --git a/src/make.code.defn b/src/make.code.defn index 202e8d9..3af2aa4 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -92,7 +92,7 @@ SRCS = Utils.F90 \ GRHydro_MP5Reconstruct.cc \ GRHydro_Wrappers.F90 \ GRHydro_HLLE.cc \ - GRHydro_Source.cc \ + GRHydro_Source.cc \ GRHydro_Source.F90 |