Skip to content

Commit

Permalink
Add in #ifdefs to support older versions of the flesh
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenrbrandt committed May 14, 2020
1 parent cab69fe commit 8b36a2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Tools/CodeGen/CharacteristicMultipatch.m
Expand Up @@ -109,8 +109,13 @@
"/* CCTK_INT num_modes... */\n",
headerComment2,
"{\n",
(* #ifdef only present to support older versions of the flesh *)
" const cGH* restrict const cctkGH = cctkGH_;\n",
" DECLARE_CCTK_ARGUMENTS_CHECKED("<>funcName<>");\n",
"#ifdef DECLARE_CCTK_ARGUMENTS_"<>name<>"\n"<>
" DECLARE_CCTK_ARGUMENTS_CHECKED("<>name<>");\n"<>
"#else\n"<>
" DECLARE_CCTK_ARGUMENTS;\n"<>
"#endif\n"
" DECLARE_CCTK_PARAMETERS;\n\n",

" const CCTK_REAL* restrict prims[" <> ToString@numvars <> "];\n",
Expand Down
5 changes: 5 additions & 0 deletions Tools/CodeGen/CodeGenCactus.m
Expand Up @@ -72,7 +72,12 @@
{"extern \"C\" ", DefineSubroutine[
name, "CCTK_ARGUMENTS",
{
(* ifdef only present to support older versions of the flesh *)
"#ifdef DECLARE_CCTK_ARGUMENTS_"<>name<>"\n"<>
"DECLARE_CCTK_ARGUMENTS_CHECKED("<>name<>");\n"<>
"#else\n"<>
"DECLARE_CCTK_ARGUMENTS;\n"<>
"#endif\n"<>
"DECLARE_CCTK_PARAMETERS;\n\n",
contents
}]}];
Expand Down

0 comments on commit 8b36a2a

Please sign in to comment.