aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/interface.ccl
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2012-02-02 13:36:18 -0600
committerErik Schnetter <schnetter@cct.lsu.edu>2012-02-02 13:36:18 -0600
commit9d96ec2e2fd0b9e96108969fd5027bb68b6a4f35 (patch)
tree459e10d364a6efd5470da0179f8f90729bb47fc5 /Carpet/Carpet/interface.ccl
parent35fd9d563e3ecd92f62afc7768f2ddd27629840b (diff)
Support accelerator data transfer
This patch provides a function interface for accelerator (GPU) devices to be called at certain points when Carpet traverses the schedule tree. This can be used to copy data between the host (CPU) and the device (GPU) as it is needed. --- Carpet/Carpet/interface.ccl | 28 ++++++++++++++++++++++++++++ Carpet/Carpet/param.ccl | 6 ++++++ Carpet/Carpet/src/CallFunction.cc | 12 ++++++++++++ Carpet/Carpet/src/Comm.cc | 8 ++++++++ Carpet/Carpet/src/Cycle.cc | 4 ++++ Carpet/Carpet/src/Evolve.cc | 2 ++ Carpet/Carpet/src/Initialise.cc | 2 ++ Carpet/Carpet/src/Requirements.cc | 34 ++++++++++++++++++++++------------ Carpet/Carpet/src/variables.cc | 3 +++ Carpet/Carpet/src/variables.hh | 3 +++ 10 files changed, 90 insertions(+), 12 deletions(-)
Diffstat (limited to 'Carpet/Carpet/interface.ccl')
-rw-r--r--Carpet/Carpet/interface.ccl28
1 files changed, 28 insertions, 0 deletions
diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl
index f56e3ba75..0415465de 100644
--- a/Carpet/Carpet/interface.ccl
+++ b/Carpet/Carpet/interface.ccl
@@ -193,6 +193,34 @@ USES FUNCTION MultiPatch_ConvertFromPhysicalBoundary
+CCTK_INT FUNCTION Accelerator_Cycle \
+ (CCTK_POINTER_TO_CONST IN cctkGH)
+USES FUNCTION Accelerator_Cycle
+
+CCTK_INT FUNCTION Accelerator_PreCallFunction \
+ (CCTK_POINTER_TO_CONST IN cctkGH, \
+ CCTK_POINTER_TO_CONST IN attribute)
+USES FUNCTION Accelerator_PreCallFunction
+
+CCTK_INT FUNCTION Accelerator_PostCallFunction \
+ (CCTK_POINTER_TO_CONST IN cctkGH, \
+ CCTK_POINTER_TO_CONST IN attribute)
+USES FUNCTION Accelerator_PostCallFunction
+
+CCTK_INT FUNCTION Accelerator_PreSync \
+ (CCTK_POINTER_TO_CONST IN cctkGH, \
+ CCTK_INT ARRAY IN groups, \
+ CCTK_INT IN ngroups)
+USES FUNCTION Accelerator_PreSync
+
+CCTK_INT FUNCTION Accelerator_PostSync \
+ (CCTK_POINTER_TO_CONST IN cctkGH, \
+ CCTK_INT ARRAY IN groups, \
+ CCTK_INT IN ngroups)
+USES FUNCTION Accelerator_PostSync
+
+
+
# Access coordinate information (on the coarse level)
CCTK_INT FUNCTION GetCoordRange \
(CCTK_POINTER_TO_CONST IN cctkGH, \