summaryrefslogtreecommitdiff
path: root/src/include/CommOverloadables.h
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-04-04 09:16:35 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-04-04 09:16:35 +0000
commit4573c9f1baf5dc4f6118283cca4560a4ce6945a4 (patch)
tree268459e9ab32bde6b3aa68a457e5b674ca5f5585 /src/include/CommOverloadables.h
parente022eb9ef2b9936c980387c4fa984b053db1b72a (diff)
Two new overloadable routines
CCTK_GroupStorageIncrease(cGH *GH, int n_groups,const int *groups,const int *timelevels, int *status) CCTK_GroupStorageDecrease(cGH *GH, int n_groups,const int *groups,const int *timelevels, int *status) These should increase or decrease the number of timelevels with storage enabled to the number specified in the timelevels array for each group in the groups array. The status array is optional, and if not NULL should contain the previous number of timelevels enabled for that group. A timelevel value of -1 implies enable/disable all timelevels for that group. The Increase function should never decrease the amount of storage, and the Decrease one never increase it, so it is possible to use Enable to ensure a certain minimum number of timelevels are available without problem, and to pass the status return from Enable in as the timelevel array of Decrease to restore the previous state of the system. The defaults for these functions currently call the old Enable and Disable GroupStorage routines if they have been overloaded, similarly the defaults for the old routines have been changed to call the new routines if they are overloaded, passing -1 as the timelevel value. The old routines will disappear eventually once all drivers are converted to the new routines. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2693 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/CommOverloadables.h')
-rw-r--r--src/include/CommOverloadables.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/CommOverloadables.h b/src/include/CommOverloadables.h
index b59a05b7..dbf23797 100644
--- a/src/include/CommOverloadables.h
+++ b/src/include/CommOverloadables.h
@@ -110,6 +110,16 @@ OVERLOADABLE(GroupDynamicData)
#undef USE_ARGUMENTS
#undef RETURN_TYPE
+#define RETURN_TYPE int
+#define ARGUMENTS cGH *GH, int n_groups,const int *groups,const int *timelevels, int *status
+#define USE_ARGUMENTS GH = GH; n_groups=n_groups; groups = groups; timelevels = timelevels; status = status;
+OVERLOADABLE(GroupStorageIncrease)
+OVERLOADABLE(GroupStorageDecrease)
+
+#undef ARGUMENTS
+#undef USE_ARGUMENTS
+#undef RETURN_TYPE
+
#undef OVERLOADABLE_CALL
#undef OVERLOADABLE_PREFIX
#undef OVERLOADABLE_DUMMY_PREFIX