summaryrefslogtreecommitdiff
path: root/src/include/cctk_Reduction.h
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-03-10 11:01:09 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-03-10 11:01:09 +0000
commitcdded1ac0545171b89da9e741ba6131f947d0217 (patch)
treee515e2d59d20d8947276bc50c418b665ac7e265c /src/include/cctk_Reduction.h
parent7bad369931eeb20a3da267d9f7a8024ff433d1b4 (diff)
Added const qualifiers to all the pointer function arguments in the flesh's
reduction API which refer to input-only arrays and structures. This fixes former problems with passing a 'const cGH *' pointer to this API. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3164 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk_Reduction.h')
-rw-r--r--src/include/cctk_Reduction.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/include/cctk_Reduction.h b/src/include/cctk_Reduction.h
index 78a395b9..e61cebc2 100644
--- a/src/include/cctk_Reduction.h
+++ b/src/include/cctk_Reduction.h
@@ -1,53 +1,53 @@
/*@@
@header cctk_Reduction.h
- @date
+ @date
@author Gabrielle Allen
- @desc
- Header file for using reduction operators
- @enddesc
- @version $Header$
+ @desc
+ Header file for using reduction operators
+ @enddesc
+ @version $Header$
@@*/
#ifndef _CCTK_REDUCTION_H_
#define _CCTK_REDUCTION_H_
#define REDUCTION_OPERATOR_REGISTER_ARGLIST \
- cGH *arg_GH, \
+ const cGH *arg_GH, \
int arg_proc, \
int arg_num_outvals, \
int arg_outtype, \
void *arg_outvals, \
int arg_num_invars, \
- int arg_varlist []
+ const int arg_varlist []
#define REDUCTION_ARRAY_OPERATOR_REGISTER_ARGLIST \
- cGH *arg_GH, \
+ const cGH *arg_GH, \
int arg_proc, \
int arg_nDims, \
- int arg_dims [], \
+ const int arg_dims [], \
int arg_nArrays, \
- void *arg_inArrays [], \
+ const void *const arg_inArrays [], \
int arg_inType, \
int arg_nOutVals, \
void *arg_outVals, \
int arg_outType
#ifdef __cplusplus
-extern "C"
+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,
+typedef int (*cReduceOperator) (const cGH *GH,
+ int arg_proc,
+ int arg_num_outvals,
+ int arg_outtype,
+ void *arg_outvals,
+ int arg_num_invars,
+ const int arg_varlist[]);
+
+int CCTK_Reduce(const cGH *GH,
int proc,
int operation_handle,
int num_out_vals,
@@ -58,7 +58,7 @@ int CCTK_Reduce(cGH *GH,
int CCTK_ReductionHandle(const char *reduction);
#define CCTK_RegisterReductionOperator(a,b) \
- CCTKi_RegisterReductionOperator(CCTK_THORNSTRING,a,b)
+ CCTKi_RegisterReductionOperator(CCTK_THORNSTRING,a,b)
int CCTKi_RegisterReductionOperator(const char *thorn,
cReduceOperator operatorGV,
@@ -77,35 +77,35 @@ const char *CCTK_ReduceOperator (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);
+int CCTK_ReduceLocalScalar (const cGH *GH, int proc, int operation_handle,
+ const void *inScalar, void *outScalar, int dataType);
/* FIXME: old interface - should go */
-int CCTK_ReduceLocalArray1D (cGH *GH, int proc, int operation_handle,
- void *in_array1d, void *out_array1d,
+int CCTK_ReduceLocalArray1D (const cGH *GH, int proc, int operation_handle,
+ const void *in_array1d, void *out_array1d,
int num_in_array1d, int data_type);
-int CCTK_ReduceLocScalar(cGH *GH, int proc, int operation_handle,
- void *in_scalar, void *out_scalar, int data_type);
+int CCTK_ReduceLocScalar(const cGH *GH, int proc, int operation_handle,
+ const void *in_scalar, void *out_scalar, int data_type);
-int CCTK_ReduceLocArrayToArray1D(cGH *GH, int proc, int operation_handle,
- void *in_array1d, void *out_array1d,
+int CCTK_ReduceLocArrayToArray1D(const cGH *GH, int proc, int operation_handle,
+ const void *in_array1d, void *out_array1d,
int num_in_array1d,
int data_type);
-int CCTK_ReduceLocArrayToArray2D(cGH *GH, int proc, int operation_handle,
- void *in_array2d, void *out_array2d,
+int CCTK_ReduceLocArrayToArray2D(const cGH *GH, int proc, int operation_handle,
+ const void *in_array2d, void *out_array2d,
int xsize, int ysize,
int data_type);
-int CCTK_ReduceLocArrayToArray3D(cGH *GH, int proc, int operation_handle,
- void *in_array3d, void *out_array3d,
+int CCTK_ReduceLocArrayToArray3D(const cGH *GH, int proc, int operation_handle,
+ const void *in_array3d, void *out_array3d,
int xsize, int ysize, int zsize,
int data_type);
-int CCTK_ReduceArray(cGH *GH,
+int CCTK_ReduceArray(const cGH *GH,
int proc,
int operation_handle,
int num_out_vals,