aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/interface.ccl
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-03-01 09:41:21 -0600
committerErik Schnetter <schnetter@cct.lsu.edu>2008-03-01 09:41:21 -0600
commitfddf250b40090d60115e90b1f364212184dc5b77 (patch)
tree75edfd4f25f9ee2b66f59319e3cbf85464be8ed4 /Carpet/Carpet/interface.ccl
parentb3b4faf4e7a0cdbf791467e6dc7c0d6984e31db1 (diff)
Implement schedule wrappers
Schedule wrappers are routines that can be registered with Carpet. They will be called before and after any scheduled routine is called. This allows custom debugging and profiling routines, such as e.g. single-stepping through the schedule.
Diffstat (limited to 'Carpet/Carpet/interface.ccl')
-rw-r--r--Carpet/Carpet/interface.ccl19
1 files changed, 19 insertions, 0 deletions
diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl
index 06c159757..734020bae 100644
--- a/Carpet/Carpet/interface.ccl
+++ b/Carpet/Carpet/interface.ccl
@@ -39,6 +39,25 @@ PROVIDES FUNCTION GetMPICommWorld WITH Carpet_GetMPICommWorld LANGUAGE C
+# Register and unregister routines which are called before and after
+# every scheduled routine
+CCTK_INT \
+FUNCTION RegisterScheduleWrapper \
+ (CCTK_INT IN CCTK_FPOINTER func_before (CCTK_POINTER_TO_CONST IN cctkGH), \
+ CCTK_INT IN CCTK_FPOINTER func_after (CCTK_POINTER_TO_CONST IN cctkGH))
+CCTK_INT \
+FUNCTION UnRegisterScheduleWrapper \
+ (CCTK_INT IN CCTK_FPOINTER func_before (CCTK_POINTER_TO_CONST IN cctkGH), \
+ CCTK_INT IN CCTK_FPOINTER func_after (CCTK_POINTER_TO_CONST IN cctkGH))
+PROVIDES FUNCTION RegisterScheduleWrapper \
+ WITH Carpet_RegisterScheduleWrapper \
+ LANGUAGE C
+PROVIDES FUNCTION UnRegisterScheduleWrapper \
+ WITH Carpet_UnRegisterScheduleWrapper \
+ LANGUAGE C
+
+
+
# Provide the function to en-/disable prolongation
CCTK_INT FUNCTION EnableProlongating(CCTK_INT IN flag)
PROVIDES FUNCTION EnableProlongating WITH CarpetEnableProlongating LANGUAGE C