From e53fc5afa1b4fcec640698c00da602c87cf5dce8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 10 Sep 2012 22:21:17 -0400 Subject: Carpet: Requirements: Correct function types Correct types of Carpet_Requirements_CheckReads and Carpet_Requirements_NotifyWrites --- Carpet/Carpet/interface.ccl | 14 ++++++++------ Carpet/Carpet/src/Requirements.cc | 16 ++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl index 12a9f1432..93953295a 100644 --- a/Carpet/Carpet/interface.ccl +++ b/Carpet/Carpet/interface.ccl @@ -319,29 +319,31 @@ PROVIDES FUNCTION VarDataPtrI \ LANGUAGE C -# programmatically check a reads clause + +# Programmatically check a reads clause void FUNCTION \ Requirements_CheckReads \ (CCTK_POINTER_TO_CONST IN cctkGH, \ CCTK_INT IN numvars, \ - CCTK_INT ARRAY IN varidx, \ - CCTK_STRING IN reads) + CCTK_INT ARRAY IN varinds, \ + CCTK_STRING IN reads_clause) PROVIDES FUNCTION Requirements_CheckReads \ WITH Carpet_Requirements_CheckReads \ LANGUAGE C -# programmatically record a writes clause +# Programmatically record a writes clause void FUNCTION \ Requirements_NotifyWrites \ (CCTK_POINTER_TO_CONST IN cctkGH, \ CCTK_INT IN numvars, \ - CCTK_INT ARRAY IN varidx, \ - CCTK_STRING IN reads) + CCTK_INT ARRAY IN varinds, \ + CCTK_STRING IN write_clause) PROVIDES FUNCTION Requirements_NotifyWrites \ WITH Carpet_Requirements_NotifyWrites \ LANGUAGE C + # The true prototype of the routine below: # int Carpet_Regrid (const cGH * cctkGH, # gh::rregs * superregss, diff --git a/Carpet/Carpet/src/Requirements.cc b/Carpet/Carpet/src/Requirements.cc index 4cf769e57..d0299f38f 100644 --- a/Carpet/Carpet/src/Requirements.cc +++ b/Carpet/Carpet/src/Requirements.cc @@ -960,10 +960,12 @@ namespace Carpet { } extern "C" - void Carpet_Requirements_CheckReads(const cGH *cctkGH, CCTK_INT nvars, - CCTK_INT const * varidx, - char const * clause) + void Carpet_Requirements_CheckReads(CCTK_POINTER_TO_CONST const cctkGH_, + CCTK_INT const nvars, + CCTK_INT const* const varidx, + char const* const clause) { + cGH const* const cctkGH = static_cast(cctkGH_); DECLARE_CCTK_PARAMETERS; if (check_requirements) { // TODO: come up with a scheme to avoid constructing and destroying clauses @@ -1073,10 +1075,12 @@ namespace Carpet { } extern "C" - void Carpet_Requirements_NotifyWrites(const cGH *cctkGH, CCTK_INT nvars, - CCTK_INT const * varidx, - char const * clause) + void Carpet_Requirements_NotifyWrites(CCTK_POINTER_TO_CONST const cctkGH_, + CCTK_INT const nvars, + CCTK_INT const* const varidx, + char const* const clause) { + cGH const* const cctkGH = static_cast(cctkGH_); DECLARE_CCTK_PARAMETERS; if (check_requirements) { // TODO: come up with a scheme to avoid constructing and destroying clauses -- cgit v1.2.3