summaryrefslogtreecommitdiff
path: root/src/include/cctk_Reduction.h
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-10-23 15:43:09 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-10-23 15:43:09 +0000
commitf6046933f466aca34cf47a871073d2e4b670bb45 (patch)
tree029a254b3d524f375a9ce781f335ca49bbf19d0e /src/include/cctk_Reduction.h
parent1baa873474d0b8e327b84b219f92dcb0c9138971 (diff)
Added implementation information to reduce structure
New functions: const char *CCTK_ReduceOperatorImplementation(int handle); int CCTK_NumReduceOperators(void); git-svn-id: http://svn.cactuscode.org/flesh/trunk@2422 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk_Reduction.h')
-rw-r--r--src/include/cctk_Reduction.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/include/cctk_Reduction.h b/src/include/cctk_Reduction.h
index 802eec24..b43ec083 100644
--- a/src/include/cctk_Reduction.h
+++ b/src/include/cctk_Reduction.h
@@ -11,11 +11,6 @@
#ifndef _CCTK_REDUCTION_H_
#define _CCTK_REDUCTION_H_
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
#define REDUCTION_OPERATOR_REGISTER_ARGLIST \
cGH *arg_GH, \
int arg_proc, \
@@ -25,6 +20,7 @@ extern "C"
int arg_num_invars, \
int arg_varlist []
+
#define REDUCTION_ARRAY_OPERATOR_REGISTER_ARGLIST \
cGH *arg_GH, \
int arg_proc, \
@@ -37,6 +33,20 @@ extern "C"
void *arg_outVals, \
int arg_outType
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* prototype for reduction operator routine */
+typedef int (*cReduceOperator) (cGH *GH,
+ int arg_proc,
+ int arg_num_outvals,
+ int arg_outtype,
+ void *arg_outvals,
+ int arg_num_invars,
+ int arg_varlist[]);
+
int CCTK_Reduce(cGH *GH,
int proc,
int operation_handle,
@@ -47,9 +57,12 @@ int CCTK_Reduce(cGH *GH,
int CCTK_ReductionHandle(const char *reduction);
-int CCTK_RegisterReductionOperator(
- int (*function)(REDUCTION_OPERATOR_REGISTER_ARGLIST),
- const char *name);
+#define CCTK_RegisterReductionOperator(a,b) \
+ CCTKi_RegisterReductionOperator(CCTK_THORNSTRING,a,b)
+
+int CCTKi_RegisterReductionOperator(const char *thorn,
+ cReduceOperator operatorGV,
+ const char *name);
int CCTK_ReductionArrayHandle(const char *reduction);
@@ -57,6 +70,10 @@ int CCTK_RegisterReductionArrayOperator(
int (*function)(REDUCTION_ARRAY_OPERATOR_REGISTER_ARGLIST),
const char *name);
+const char *CCTK_ReduceOperatorImplementation(int handle);
+
+int CCTK_NumReduceOperators(void);
+
/* FIXME: old interface - should go */
int CCTK_ReduceLocalScalar (cGH *GH, int proc, int operation_handle,
void *inScalar, void *outScalar, int dataType);