aboutsummaryrefslogtreecommitdiff
path: root/src/ReductionCount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ReductionCount.c')
-rw-r--r--src/ReductionCount.c46
1 files changed, 18 insertions, 28 deletions
diff --git a/src/ReductionCount.c b/src/ReductionCount.c
index 71b99b2..bdcc2ef 100644
--- a/src/ReductionCount.c
+++ b/src/ReductionCount.c
@@ -19,9 +19,7 @@ static const char *rcsid = "$Id$";
CCTK_FILEVERSION(CCTDevelopment_LocalReduce_ReductionCount_c)
/* local function prototypes */
-static int ReductionCount (const cGH *GH,
- int proc,
- int num_dims,
+static int ReductionCount (int num_dims,
const int from[/* dim */],
const int to[/* dim */],
int iterator[/* dim */],
@@ -100,21 +98,21 @@ static int ReductionCount (const cGH *GH,
@vio in
@endvar
@@*/
-int ReductionCountArrays (const cGH *GH,
- int proc,
- int num_dims,
- const int dims[/* num_dims */],
- int num_inarrays,
- const void *const inarrays[/* num_inarrays */],
- int intype,
- int num_outvals,
- void *outvals /* [num_outvals] */,
- int outtype)
+int ReductionCountArrays (int N_dims, int operator_handle,
+ int param_table_handle, int N_input_arrays,
+ const CCTK_INT input_array_dims[],
+ const CCTK_INT input_array_type_codes[],
+ const void *const input_arrays[],
+ int M_output_numbers,
+ const CCTK_INT output_number_type_codes[],
+ void *const output_numbers[])
{
- return (ReductionArrays (GH, proc, num_dims, dims,
- intype, num_inarrays, inarrays,
- outtype, num_outvals, outvals,
- ReductionCount));
+ return (ReductionArrays (N_dims, operator_handle,
+ param_table_handle, N_input_arrays,
+ input_array_dims, input_array_type_codes,
+ input_arrays, M_output_numbers,
+ output_number_type_codes, output_numbers,
+ ReductionCount));
}
/*****************************************************************************/
@@ -128,9 +126,7 @@ int ReductionCountArrays (const cGH *GH,
Returns the number of grid points of a distributed array
@enddesc
@@*/
-static int ReductionCount (const cGH *GH,
- int proc,
- int num_dims,
+static int ReductionCount (int num_dims,
const int from[/* dim */],
const int to[/* dim */],
int iterator[/* dim */],
@@ -145,10 +141,7 @@ static int ReductionCount (const cGH *GH,
{
int i;
-
/* avoid compiler warnings about unused parameters */
- (void) (GH + 0);
- (void) (proc + 0);
(void) (num_dims + 0);
(void) (from + 0);
(void) (to + 0);
@@ -160,12 +153,9 @@ static int ReductionCount (const cGH *GH,
(void) (num_outvals + 0);
/* assign the return value */
- if (proc < 0 || proc == CCTK_MyProc (GH))
+ for (i = 0; i < num_inarrays; i++)
{
- for (i = 0; i < num_inarrays; i++)
- {
- outvals[i] = num_points;
- }
+ outvals[i] = num_points;
}
return (0);