aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/CaKernel.m
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/CodeGen/CaKernel.m')
-rw-r--r--Tools/CodeGen/CaKernel.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tools/CodeGen/CaKernel.m b/Tools/CodeGen/CaKernel.m
index bc06ad2..7d12bf2 100644
--- a/Tools/CodeGen/CaKernel.m
+++ b/Tools/CodeGen/CaKernel.m
@@ -26,6 +26,7 @@ CaKernelCode;
CaKernelEpilogue;
CaKernelSchedule;
CaKernelConfigurationCLL;
+CaKernelInterfaceCLL;
Begin["`Private`"];
@@ -80,6 +81,20 @@ DefFn[CaKernelSchedule[] :=
CaKernelConfigurationCLL[] :=
"REQUIRES CUDA";
+CaKernelInterfaceCLL[] :=
+"
+# These functions are provided by the CaKernel thorn
+
+CCTK_INT FUNCTION Device_RegisterMem(CCTK_POINTER IN cctkGH, CCTK_INT IN vi, CCTK_INT IN num_tls)
+REQUIRES FUNCTION Device_RegisterMem
+
+CCTK_INT FUNCTION Device_UnRegisterMem(CCTK_POINTER IN cctkGH, CCTK_INT IN vi)
+REQUIRES FUNCTION Device_UnRegisterMem
+
+CCTK_POINTER FUNCTION Device_GetVarI (CCTK_POINTER IN cctkGH, CCTK_INT IN vi, CCTK_INT IN num_tls)
+REQUIRES FUNCTION Device_GetVarI
+";
+
DefFn[codeBlock[macro_String, contents:CodeGenBlock] :=
Module[
{},